To make user come back to the same page after login

Apr 26 2012 9:04 AM
Dear all,
         Suppose we have many pages in our application and we are allowing the user to view few contents in the page without login and wanted to redirect to the same page if user wish to login to view complete information.
          Like If a user has come to the website and opened some page. Now if they login to the website, the same page should be opened.

How to do this .please send me the code in C# web application.I have tried using this code.Like in Page2.aspx.cs:
 Response.Redirect("Logon.aspx?ReturnUrl=Page2.aspx");

Again in Logon.aspx when i entered the user name it should redirect to the last page i.e. Page2.aspx.How to do this


Thanks In advance,
Dhilip


Answers (1)