Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dimitris Chrysomallis 21 posts 73 karma points
    Apr 04, 2011 @ 16:39
    Dimitris Chrysomallis
    0

    Macro property to set http_host

    Hello,

    We have user control in which we have a public property that sets the base url of hyperlinks.

    public string DestinationUrl
    {
    get { return _destinationUrl; }
    set
    {
    _destinationUrl = Request.Url.GetLeftPart(UriPartial.Authority) + "/" + value;
    }
    }

    problem is that this property is never set properly. Actually, Whatever reference to Request.Url properties (when referenced from inside a public property) results in null ref exception. This does not happen when the control is used outside umbraco.

    Is the Url object beinng reset?

    what is the proper way to pass host, authority, path, query properties to a user control through umbraco?

    Thank you

    Dimitris

Please Sign in or register to post replies

Write your reply to:

Draft