[英]How exchange data between each page in ASP.NET and C#
I'm new to ASP.NET and C# and I want to create simple webapp.我是 ASP.NET 和 C# 的新手,我想创建简单的 webapp。 How can I exchange data from a form between different webpage?
如何在不同网页之间交换表单中的数据? Like for example, I'm inputing a data in a form from my page1.aspx, then I want to go to a different page, like page2.aspx, then I want to click the back link button to go to the page1.aspx but my data is still save in the form.
例如,我正在从我的 page1.aspx 输入表单中的数据,然后我想 go 到不同的页面,例如 page2.aspx,然后我想单击返回链接按钮到 go 到 page1.aspx但我的数据仍然保存在表单中。
Thanks.谢谢。
You can keep the data in the session variable.您可以将数据保存在 session 变量中。 Session varaible values will remains till the session ends.You can keep the form values in the session variable and use that again when you come back to the page to load the form fields.
Session 变量值将保留到 session 结束。您可以将表单值保留在 session 中以加载变量并在返回页面时再次使用它。
http://msdn.microsoft.com/en-us/library/ms972429.aspx http://msdn.microsoft.com/en-us/library/ms972429.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.