string url = Page.ResolveUrl(" page2.aspx"); then the url output would be "/sub/page2.aspx", however: string url = WebUtil.ResolveUrl(" page2.aspx"); // WebUtil being a static class containing this article's method would yield "/page2.aspx" which is understandable since it can not make the subdirectory determination from the string parameter alone.
Jun 02, 2011 · Solving this is easy using the ResolveUrl method: Response.Redirect(ResolveUrl(" ~/default.aspx")); Where This Won't Work. ResolveUrl is only available within the context of a Page or a UserControl; if you're, for instance, inside an ASHX, this method isn't available. In these cases, you have to use the following line to do the job:
One of the many nice things they have added in MVC 2 is model/view model validation on both the client and server side. I won’t go into the basics here since they have been covered extensively by others.
1 post published by Anders G. Nordby during January 2013. My current customer has asked for a way to know what version we have deployed in the various environments (test, staging, production), and we agreed that displaying the assembly version of our main project DLL is a good way of achieving this.
Blank tree diagram template