Hi,
In the old html templates, we had this tag <!--@Global:Pageview.Url.Raw.JSEncoded()-->.
How do I access this in razor? - Or anything that gives a similar value.
Thanks!
- Mikkel
Hi,
In the old html templates, we had this tag <!--@Global:Pageview.Url.Raw.JSEncoded()-->.
How do I access this in razor? - Or anything that gives a similar value.
Thanks!
- Mikkel
.JSEncode() is a HTML template extension tag.
The Razor template is C# - so you can use normal .NET: https://msdn.microsoft.com/en-us/library/dd991914%28v=vs.110%29.aspx
Thank you!
Used the following:
@HttpUtility.JavaScriptStringEncode(HttpContext.Current.Request.RawUrl)
You must be logged in to post in the forum