Click here to Skip to main content
15,306,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when user tries to access a restricted page with a querystring parameter

eg myaccount.aspx?sid=3&page=2

and is not authenticated, user will be redirected to login.aspx page.

the problem is that the querystirng (sid=3&page=2) will be lost .

the returnURL will be like "login.aspx?returnurl=myaccount.aspx". is there any solution for that? thanks.
Posted

http://forums.asp.net/p/1345257/2733847.aspx[^]

http://www.pcreview.co.uk/forums/formsauthentication-redirectfromloginpage-no-returnurl-t1288957.html[^]

If i misunderstand your question, please feel free to correct me.I hope the above information will be helpful.If you have more concerns, please let me know.
   
v2
You can store your QueryString values in a session and retrieve those when you are redirecting the user to the page.
   
You can do what Tarakeshwar Reddy says. You can store it in session .
   
Dear Friend Use Previous Page default property in asp.net object i think that can solve the issue
refer This http://www.google.co.in/#hl=en&source=hp&biw=1533&bih=812&q=previous+page+url+in+asp.net&aq=0&aqi=g10&aql=&oq=previous+pa&fp=b903e66e0aa5b664[^]
Regards
Vipin Kumar Mallaya
   
Thanx Mr. Reddy for ur suggestion.
if i store those query string in session, but it doesnt make any sense to store it in session although we have return url, just it cut downs our parameter list to single parameter.
I have to find solution within return URL only.
Can u help me??
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900