how tt Get ImageURL from custom field in Sitefinity7.0
I have added a custom field by the name "FAQImage" in a FAQlist.
How do i get the URL value from my custom field in FAQ list
Hello Sunny,
There are several ways to obtain an image Url. However, you should first get the Image object. You can achieve this by using the extension methods GetValue or GetValue<T> from the Telerik.Sitefinity.Model namespace, for instance:
var img = dataItem.GetValue<Telerik.Sitefinity.Libraries.Model.Image>(
"MyImageField"
);
img.Url;
SystemManager.GetContentLocationService().GetItemDefaultLocation(img).ItemAbsoluteUrl;
UrlPath.ResolveUrl(DataResolver.Resolve(img,
"URL"
,
null
),
true
);