在实际项目开发过程中经常需要在两个页面之间传递一些参数,本文在此总结出以下几个传递参数的方法
在撰写之前假设第一个页面为send.aspx,第二个页面为receive.aspx
1、通过URL链接地址传递
(1) send.asp代码
(2) receive.aspx代码
2、POST方式传递
(1) send.asp代码
(2) receive.aspx代码
3、Session方式传递
(1) send.asp代码
(2) receive.aspx代码
4、Application方式传递
(1) send.asp代码
(2) receive.aspx代码
5、使用Server.Transfer进行传递
(1) send.asp代码
(2) receive.aspx代码
参考资料:
【1】http://www.cnblogs.com/liaofeifan/articles/1531578.html
【2】http://hi.baidu.com/4622/blog/item/e835871e873bff1e403417c3.html
本文总结了五种在两个网页间传递参数的技术:URL链接地址、POST方式、Session、Application及Server.Transfer。每种方法都提供了示例代码,帮助开发者理解如何在不同场景下选择合适的参数传递方式。
659

被折叠的 条评论
为什么被折叠?



