Go Back   Wiki NewForum | Latest Entertainment News > Career Forum & Tips > Tech Forum & Tutorial > ASP.NET Forum & Tutorial


Navigation methods in ASP.NET


Reply
Views: 1835  
Thread Tools Rate Thread
  #1  
Old 05-30-2009, 10:01 AM
bholus7
Guest
 
Posts: n/a
Default Navigation methods in ASP.NET

Navigation methods in ASP.NET


ASP.NET supports following ways to navigate between pages in your application.

Hyperlink control

This is server control use for navigation to another page specified in the NavigateURL property. Hyperlink control doesn’t expose any server side event.



Response.Redirect method

This method is used to navigate to another page from code. You can use this method to navigate from a Link****on or Image****on control.

For example
Private Sub Link****on1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Link****on1.Click
Response.Redirect("Page2.aspx")
End Sub
Server.Transfer method

This method can be used only with .aspx file. It allows to retain some information between the requests when its preserveForm argument is set to true.
Server.Execute method

Like Server.Transfer, this method is also used with .aspx file only. This method enables new page execution while still displaying the current web form.
Window.Open method

Display a page in a new browser window on the client.

Reply With Quote
  #2  
Old 05-30-2009, 10:02 AM
bholus7
Guest
 
Posts: n/a
Default Explain the difference between Server.Transfer and response.Redirect.

Explain the difference between Server.Transfer and response.Redirect.

Redirect and Transfer both cause a new page to be processed. The difference lies in the way the interaction between the client and the server occurs.



Response.Redirect messages the client browser asking it to request for another page.

e.g. if a browser is on page A which has a Response.Redirect, then it asked to request for another page B by the server. When the client browser requests for it, then it is provided with the requested page B.
With Server.


Transfer, the browser is not requested to ask for another page. Instead it is directly provided with the page B. In this scenario, the browser address bar continues to show the address of the previous URL.
Reply With Quote
Reply

New topics in ASP.NET Forum & Tutorial





Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
WikiNewForum)