Navigating an ASP.Net Page
Author: DevASP
Download Source Code : 422_GoBack.zip
This article is about how you can go back or forward in your browser. Suppose you want to give the user of your site functionality just like the Back and Forward Buttons in the IE.
Now open your code window and write the following line of code in the click event of page load event.
In the click event of the button write the following line of code. In the line of code a parameter is send with the query string which is the URL of the previous page.
Now add a new web form into your project.
Drop a label control on the form and set its following properties.
Text = “Click the button below to go back to previous page”
Now drop a button control on the form and set its following properties as below:
Open the code window of second web form and write following code in the click event of the button to go back to the previous page. Actually what does it do? It gets the a URL which we send in query string from the first web form and redirect the user to that URL.
Now you can do the functionality of the previous button yourself as we do that of previous button.