Hi everyone
I'm trying to add an image property to a pagetype in cms7 but I keep getting the error above.
This is how I've added it to the pagetype:
[BackingType(typeof(PropertyImageUrl))] [Display( Name = "Image", Description = "Image", Order = 3)] public virtual string ImageUrl { get; set; }
But all I get is Unable to cast object of type 'EPiServer.Url' to type 'System.String'. when I try to choose an image.
Anyone that know what might be wrong?
Change the type of your property from string to EPiServer.Url
Thanx Johan
But everywhere I look, people have used string. How's this possible?
This has changed in the release of EPiServer 7
aha, fair enough :)
Hi everyone
I'm trying to add an image property to a pagetype in cms7 but I keep getting the error above.
This is how I've added it to the pagetype:
[BackingType(typeof(PropertyImageUrl))]
[Display(
Name = "Image",
Description = "Image",
Order = 3)]
public virtual string ImageUrl { get; set; }
But all I get is Unable to cast object of type 'EPiServer.Url' to type 'System.String'. when I try to choose an image.
Anyone that know what might be wrong?