[ASP.NET][VB.NET]Redirect Page after connexion

Fruity

Member
Joined
Sep 28, 2004
Messages
6
Programming Experience
1-3
Hi,

I have a asp.net application
When one arrives on the site, as long as one is not connected one is considered anonymous
For some page, it is necessary to be connected, for example I want to modify an account, the page checks if the user is not anonymous, and if so, transfer to a page of connection
I seek to return the user after his authentification to return it in the page which has it to redirect

Exemple
Anonymous User
Click on link modify_compte
The modify_compte.aspx page, checks if it is connected
If No connected, it redirects it towards login.aspx
Code: Server.Transfer("./login.aspx")
The user connects
The login.aspx page redirects it towards the starting page: modify_compte.aspx, it can modify its account

How I can recover the URL of the page which carried out the redirection?? In the page object, I have the URL of the page in progress
I will be able to use a session object, but not very practical

I sought on the Web, without success, all that I find it is the difference between server.transfer and response.redirect

An idea, one suggestion,
Thank you in advance
 
On another forum, one answered me, therefore I you afis to also benefit from the solution
Request.ServerVariables("HTTP_REFERER")
reference the URL of the appealing page

Attention in postback, it acts of the URL of the page
 
Back
Top