"会话变量"在vb.net [英] "Session Variable" in vb.net
本文介绍了"会话变量"在vb.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有4个网页与形式(VS2012)。第一种形式的填充基于搜索的数据。第二页就是这将有链接到 3形式的中间页
和 4的形式
。当形式3
被关闭,这中间页打开。这中间页的工作是保持变量传递到形式3
和 4的形式
。我试图使用会话varible,而不是查询字符串。
- 我可以创建一个从形式传递1作为查询字符串?在中间页中的会话变量
- 我可以在中三及中4阅读这些会话变量?
- 将我在写会话变量在Page_Load事件?
- 还有什么我应该在使用会话变量考虑?
我希望我已经给出正确的所有信息。
解决方案
- 是的,你可以创建在中间页会话变量
- 是的,你可以在你的应用程序读取的任何形式的任何人这些会话变量
- 是的,你可以写在Page_Load事件添加/更新会话变量
- 您应该删除会话变量一旦你完成在应用程序中使用它们
希望这有助于。
I have 4 pages with forms (VS2012). The first form fills the data based on the search. The second page is just an intermediate page which will have links to the form 3
and form 4
. When form 3
is closed, this intermediate page opens up. The job of this intermediate page is to hold the variables and passes on to form 3
and form 4
. I am trying to use session varible instead of query string.
- Can I create a session variables in the intermediate page which is passed from form 1 as querystring?
- Can I read these session variables in form 3 and form 4?
- Will I be writing the session variable in the Page_Load event?
- What else should I be considering while using session variable?
I hope I have given all the information properly.
解决方案
- Yes, you can create session variables in the intermediate page
- Yes, you can read these session variables in anyone of anyone of the forms in your app
- Yes, you can write add/update session variables in the page_load event
- You should remove the session variable once you finish using them in your application
Hope this helps.
这篇关于"会话变量"在vb.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文