Frequently Asked Interview Questions

FAQS on ASP.NET Page navigation techniques

FAQS on ASP.NET Page navigation techniques
Hyperlink control : Navigate from one page to another page.
Response.Redirect : Navigate from one page to another page from source code.
Server.Transfer : Navigate from one page to another page, This method works only when navigating to a Web Forms page (.aspx).
Server.Execute : Begin executing a new Web form while still displaying the current Web form. The contents of both forms are combined and rendered.
Window.Open script method : Display a page in a new browser window on the client.
Server.TransferResponse.Redirect
Redirection happens on the serverRedirect the redirection happens from the browser
This is faster as there is no round trip involvedIt is slower than Server.Transfer as there is round trip from the server to the client browser.
It works only with .aspx filesIt works with .aspx and .Htm pages
Server.Transfer will work with files on the same web server and we can not use this to transfer other server or site.Response.Redirect will work with files on the same web server and other server or site
Server.Execute method is used to process any other Web form without leaving the first Web form.
Yes, we can use Server.Transfer or Server.Execute to send a webform's QueryString, ViewState, and event procedure information to another webform.

For this to work you have to set the preserveForm argument to True.To be able to read one Web form’s ViewState from another, you must first set the EnableViewStateMac attribute in the Web form’s Page directive to False. By default, ASP.NET hashes ViewState information, and setting this attribute to False disables that hashing so that the information can be read on the subsequent Web form.

Most Visited Pages

Home | Site Index | Contact Us