如何将第一页数据转换为第二页数据 [英] How to ftech 1st page of data to 2nd page
本文介绍了如何将第一页数据转换为第二页数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
早安朋友,
我现在在3个不同的页面上有3个表单,我要做的是,当用户填写第一页时,我提供了下一个按钮以跳到下一页,所以我想将第一页的数据带到第二页,所以可以任何人都可以这样做.
最好的问候,
Santosh更多
解决方案
您需要将数据存储在某个地方,以便稍后使用.有三种基本选项可以延长生命周期:
1)会话变量
2)Cookies
3)数据库
大多数网站结合使用了这些内容.
会话写阅读:
DataType myValue =(DataType)Session [" ];
会话阅读撰写:
Session [" ] = myValue;
Cookie写:
http://msdn.microsoft.com/en-us/library/aa287547(v = vs.71) [ ^ ]
Cookie阅读:
http://msdn.microsoft.com/en-us/library/aa287533 (v = vs.71).aspx [这是Microsoft链接 [使用ASP.NET 4.0进行URL路由 [ ^ ]
请参考:
将页面值传输到另一个页面 [如何:在ASP.NET网页之间传递值 [ 解决方案
You need to store the data somewhere, so it is available later. There are three basic options, in increasing lifetime:
1) Session variables
2) Cookies
3) Database
Most websites use a combination of these.
SessionWriteRead:
DataType myValue = (DataType)Session["SessionVariableNameHere"];
SessionReadWrite:
Session["SessionVariableNameHere"] = myValue;
Cookie Write:
http://msdn.microsoft.com/en-us/library/aa287547(v=vs.71)[^]
Cookie Read:
http://msdn.microsoft.com/en-us/library/aa287533(v=vs.71).aspx[^]
Database read / write is more complex as it depends on what database systems are available to you.
[edit]:doh: Read/write round wrong way - OriginalGriff[/edit]
if you use session for transferring data, it use your local resources like your server ram that obviously not a good ID when you can use an easy to use collections like querystring, or if you interest in SEO , use url routing, this link can help you:
this is a Microsoft link[^]
and this is a code project article about routing:
URL Routing with ASP.NET 4.0[^]
Please refer:
Transferring page values to another page[^]
How to: Pass Values Between ASP.NET Web Pages[^]
这篇关于如何将第一页数据转换为第二页数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文