ImageField ImageID is all Zeros
I am adding an ImageField to a custom module that i am creating and when i try to get the Selected Image ID to store it always comes up as 00000000-0000-0000-0000-000000000000. Am I doing something wrong here?
<
sf:ImageField
ID
=
"productImageField"
runat
=
"server"
DataFieldType
=
"Telerik.Sitefinity.Model.ContentLinks.ContentLink"
DisplayMode
=
"Write"
ShowDeleteImageButton
=
"false"
CssClass
=
"sfprofileField sfprofileAvatar"
/>
Hi Chris Salas,
Could you explain in more detail what do you mean by "try to get the Selected Image ID to store"?
Kind regards,Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
productImageField.ImageId.ToString();
Hello Chris Salas,
I still do not follow. Could you please send us your entire module project so we could see what exactly is going on.
All the best,Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
Hi,
I'm having the same issue,
<
sitefinity:ImageField
ID
=
"ImageField"
runat
=
"server"
DataFieldType
=
"Telerik.Sitefinity.Model.ContentLinks.ContentLink"
DisplayMode
=
"Write"
/>
If you want to retrieve a GUID from the ImageField, I believe you need to set the DataFieldType to be Guid instead of ContentLink.
I talked a little about this on this blog post about using Sitefinity Fields in widgets:
Cheers for the reply,
I'm trying to implement this as a Intra Module in the admin area of sitefinity.
Is it the same approach.