使用C#在Asp.Net中使用“隐藏字段"将值从一页传递到另一页 [英] Passing value from one page to another using Hidden Field in Asp.Net Using C#

查看:219
本文介绍了使用C#在Asp.Net中使用“隐藏字段"将值从一页传递到另一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两页.

我想将值从一页传递到另一页,

有很多方法,但是我想知道如何使用隐藏字段"来实现它?


在此先感谢!!!

I have two pages.

i want to pass a value from one page to another,

there are many ways but i want to know how can i do it with Hidden Field ?


Thanks in Advance !!!

推荐答案

使用隐藏字段将值从一页传递到另一页
您需要使用PreviousPage概念.
使用服务器控件HiddenField.将页面传输按钮的PostbackUrl属性设置为下一页,然后在下一页中检索信息.

可能有帮助的链接:
MSDN:HiddenField类 [ MSDN:Page.PreviousPage属性 [ MSDN:Button.PostBackUrl属性 [ ^ ]
Passing value from one page to another using Hidden Field
You need to use PreviousPage concept.
Use server control HiddenField. Set the PostbackUrl property of the page transfer button to the next page and then retrieve the information in next page.

Links that would help:
MSDN: HiddenField Class[^]
MSDN: Page.PreviousPage Property[^]
MSDN: Button.PostBackUrl Property[^]


如何使用隐藏字段 [

这篇关于使用C#在Asp.Net中使用“隐藏字段"将值从一页传递到另一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆