Click here to Skip to main content
15,898,771 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a page signup.aspx where user can register, how this page will find from which page request came from and how it will redirect user after registration to the requesting page, i want to do this using query string but don't know how i am a beginner plz help.

Thanks
Posted

to do this using query string
Why query string for such thing? Necessary?

Query string way:
Add the lastPage in the querystring. Once the singup is done, based on the lastPage querystring, form the correct url and then redirect there.

Now, query string is not just the only way. There can be lot more ways to do the same. You can use global object, other stage management techniques including query string.

For example, for session, store the page url in a session before moving to the signup page. Once singup is done, get the url from there and use it to redirect user back to the old one.
 
Share this answer
 
Comments
Monjurul Habib 6-Mar-11 3:51am    
nice recommendation, my 5+.
ProgrammerAt 6-Mar-11 8:34am    
Hi Sandeep, thanks that's what i want to do but plz can u show me where in pages i have to write query string and can u show me code how to form the url using that query string as i don't know how to use query string.

Thanks and Regards
Sandeep Mewara 6-Mar-11 8:38am    
This article should help you out:
http://www.codeproject.com/KB/aspnet/QueryString.aspx
ProgrammerAt 6-Mar-11 10:07am    
Hi,
i have a page Default.aspx it has a hyperlink i want to send user to SignUp.aspx, in Default.aspx i have written this in page load event
HyperlinkSignUp.NavigateUrl = "SignUp.aspx?ReturnUrl=" + HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]);
is this correct?
if yes then what i have to write in button event of my SignUp page?
Dear bro,

see this may it will be helpfull
http://msdn.microsoft.com/en-us/library/ff647070.aspx[^]
 
Share this answer
 
You can create a session call it source and reset the page name it everytime you open one, when u leave to your distination you can check the session and know where the request came from. it is one way of doing it but i think there's another way using javascript.
 
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