我应该使用会话还是查询? [英] Should I use sessions or querystring?
问题描述
我正在使用c#项目在Asp.net上工作。在这里我有一个要求,打开同一个窗口,多个页面有多个会话。
示例:
1)MainPage.aspx是父窗口。哪个有多个订单。
2)ChildPage.aspx这是儿童窗口
客户可以打开选择不同的订单不同的机器。因此总是打开一个包含不同数据的ChildPage.aspxpage(订单值)。
那么,对于这些要求我应该使用哪种方法以及为什么?
我尝试了什么:
我尝试使用Sessions,这对我不起作用。
I am working on Asp.net with the c# project. Here I have a requirement, Open the same window with multiple pages with multiple Sessions.
Example:
1) MainPage.aspx which is Parent window. Which have multiple orders.
2) ChildPage.aspx which is child window
The customer can open different machines by selecting different orders. So always open a ChildPage.aspxpage with different data(Order values).
So, for these requirements which method I should use and Why?
What I have tried:
I tried using Sessions, which is not working for me.
推荐答案
使用视图状态/隐藏字段。
ASP.NET视图状态概述 [ ^ ]
Use view states / hidden fields.
ASP.NET View State Overview[^]
您使用会话或查看状态
对于查看状态使用:
了解ASP.NET视图状态 [ ^ ]此链接如下
Viewstate仅用于一页
供会话使用:
ASP.NET会话状态概述 [ ^ ]
会话是使用服务器端和客户端
You use the session or View state
For view state use:
Understanding ASP.NET View State[^] this link follow
Viewstate is use in only one page
For session use:
ASP.NET Session State Overview[^]
session is use server side and client side
您使用会话或查看状态
更多适合您的问题用于查看状态。
对于查看状态使用:
了解ASP.NET视图状态 [ ^ ]此链接关注
Viewstate仅在一页中使用
供会话使用:
ASP.NET会话状态概述 [ ^ ]
会话使用服务器端和客户端
You use the session or View state
More suitable for Your Question in use to View state.
For view state use:
Understanding ASP.NET View State[^] this link follow
Viewstate is use in only one page
For session use:
ASP.NET Session State Overview[^]
session is use server side and client side
这篇关于我应该使用会话还是查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!