如何使用查询字符串在asp.net中查找请求页面 [英] how to use query string to find requesting page in asp.net

查看:70
本文介绍了如何使用查询字符串在asp.net中查找请求页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面signup.aspx,用户可以在其中注册,该页面如何查找来自哪个页面的请求,以及注册后如何将用户重定向到请求页面,我想使用查询字符串来做到这一点,但是不要不知道我是如何帮助初学者的.

感谢

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

推荐答案

使用查询字符串
完成此操作 为什么要查询这样的字符串?必要吗?

查询字符串的方式:
在查询字符串中添加lastPage.一旦完成编码,就基于lastPage查询字符串,形成正确的url,然后在此重定向.

现在,查询字符串不仅仅是唯一的方法.可以有很多更多的方法可以做到这一点.您可以使用全局对象以及其他阶段管理技术,包括查询字符串.

例如,对于会话,将页面URL存储在会话中,然后再移至注册页面.一旦完成命名,请从那里获取url并将其用于将用户重定向回旧的URL.
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.


亲爱的兄弟,

看到这可能会对您有所帮助
http://msdn.microsoft.com/en-us/library/ff647070.aspx [ ^ ]
Dear bro,

see this may it will be helpfull
http://msdn.microsoft.com/en-us/library/ff647070.aspx[^]


您可以创建一个会话源,并在每次打开页面时重设页面名称.当您离开时,您可以检查会话并知道请求来自何处.这是一种实现方式,但我认为还有另一种使用javascript的方式.
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.


这篇关于如何使用查询字符串在asp.net中查找请求页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆