Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am wriitng a user control that I would like to return the full url of a page. However when I call NiceUrlFullPath it only returns a path without the domain.
postedmessage.Body = messageBody + messageFromFriendTxt.Text + umbraco.library.NiceUrlFullPath(pageID);
Any ideas?
Hi,
You have to format it yourself. Try
string
.Format("http://{0}{1}", HttpContext.Current.Request.ServerVariables["HTTP_HOST"], umbraco.library.NiceUrl(pageID));
Cheers,
Richard
Gavin
Richard is correct, but there's a way to have it included. If your settings
<useDomainPrefixes>false</useDomainPrefixes>
in umbracoSettings.config is set to "true", then the domain name will be included when calling NiceUrl()
(it's mostly applicable when using multiple sites in a single umbraco installation where the sites have different host names assigned)
/Dirk
Thanks guys...both solutions work....thanks
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
NiceUrlFullPath is not returning the domain name of path
I am wriitng a user control that I would like to return the full url of a page. However when I call NiceUrlFullPath it only returns a path without the domain.
postedmessage.Body = messageBody + messageFromFriendTxt.Text + umbraco.library.NiceUrlFullPath(pageID);
Any ideas?
Hi,
You have to format it yourself. Try
string
.Format("http://{0}{1}", HttpContext.Current.Request.ServerVariables["HTTP_HOST"], umbraco.library.NiceUrl(pageID));
Cheers,
Richard
Gavin
Richard is correct, but there's a way to have it included. If your settings
in umbracoSettings.config is set to "true", then the domain name will be included when calling NiceUrl()
(it's mostly applicable when using multiple sites in a single umbraco installation where the sites have different host names assigned)
Cheers,
/Dirk
Thanks guys...both solutions work....thanks
is working on a reply...