When there is need to encode/decode a url then the HttpUtility has a function that does this for us.
HttpUtility.UrlDecode(url) HttpUtility.UrlEncode(url) |
(Update: Works just the same way for vb.net)
When there is need to encode/decode a url then the HttpUtility has a function that does this for us.
HttpUtility.UrlDecode(url) HttpUtility.UrlEncode(url) |
(Update: Works just the same way for vb.net)
If there is a need to get the URI that the was used to reach the controller then the Request holds that information and it can be retrieved to a URI object
public ActionResult MyAction() { var uri = Request.Url; var port = uri.Port; var absoluteUri = uri.AbsoluteUri //... do things here return View(); } |
To make this change for one project at a time:
In “Web.config”find the line saying “compilation debug=true” and switch this to false.
To make this change for the entire server:
In “%SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\CONFIG\Machine.config” find the line saying “compilation debug=true” and switch this to false.
More info on this from Microsoft:http://support.microsoft.com/kb/815157