Search This Blog

Oct 15, 2011

Navigation in ASP.NET 4.0

Users don't type just in the address of a web page directly, so it is important to offert them a clear and straighforward navigation system.
For this you need what are realative URLs and absolute URLs

Relative URLs are used to point to resources by their complete location including protocol and domain information.
Absolute URLs are mostly useful if you want to point to resources outside your own web site.

ASP.NET offers three different controls to navigate in your site: Menu, TreeView and SiteMapPath.

In addition to built-in navigation you can also programmatically send the user to a different page. ASP.Net supports two major ways to do this: client side using Response.Redirect and Response.RedirectPermanent(That's new in ASP.NET 4.0) and server side using Sever.Transfer. The redirect methods instruct the browser to fetch a new page from the server whereas the transfer method is executed at the server.

No comments:

Post a Comment