I have a custom UserControl (inherits System.Web.UI.UserControl) with this property, which should be set to a URL on the site that you want to link to:
[DefaultValue("~/NewsItem.aspx"), UrlProperty("*.aspx")]
public string InternalItemViewUrl
{
get { return _internalItemViewUrl; }
set { _internalItemViewUrl = value; }
}
The control will present the URL picker drop-down correctly, but if you select a URL from the list, it does not change it to a site-relative "~/foo.aspx" link, like HyperLink does, but instead only gets "foo.aspx" which does not work (the control is in /controls and the page obviously is not). If you scroll all the way down and use "Pick URL..." which opens the full pop-up window, a page selected in that dialog does get converted to "~/foo.aspx"
Am I missing something obvious here to make this work?