Click here to Skip to main content
15,845,565 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.

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.
Share this answer
You can store your QueryString values in a session and retrieve those when you are redirecting the user to the page.
Share this answer
You can do what Tarakeshwar Reddy says. You can store it in session .
Share this answer
Dear Friend Use Previous Page default property in object i think that can solve the issue
refer This[^]
Vipin Kumar Mallaya
Share this answer
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??
Share this answer

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