I am trying to get the the url from a page on a multi-lingual Kentico site in simple ascx c# web control that is being used as a web part. The objective is pick up the translation culture in use.
The url in the browser shows. http://psychoanalysis.today/en-GB/Editors/Acknowledgements.aspx
protected void Page_Load(object sender, EventArgs e) { string translatelabels = HttpContext.Current.Request.Url.AbsoluteUri;
But the output from HttpContext.Current.Request.Url.AbsoluteUri; is
http://psychoanalysis.today/CMSPages/PortalTemplate.aspx?aliaspath=%2fEditors%2fAcknowledgements
should be something like this:
<%@ Import Namespace="CMS.DocumentEngine" %> ... <%=CurrentDocument.AbsoluteURL%>
P.S. Take a look at this topic as well
Please, sign in to be able to submit a new answer.