如何将标签文本传递到另一个页面 [英] How to pass label text to another page
本文介绍了如何将标签文本传递到另一个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将标签文本传递到另一个页面
How to pass label text to another page
推荐答案
您可以使用不同的状态管理技术来完成此操作.
请参阅此链接:
将页面值传输到另一个页面 [
You can use different state management techniques to accomplish this.
Refer this link:
Transferring page values to another page[^]
or
use a session object
session("labelcontents") = label.text
然后在下一页中,您可以致电
then in your next page you can call
session("labelcontents")
并粘贴到任何地方
将文本放置在会话变量中,例如
place that text in a session variable like this
session["labeltext"]=label1.Text;
并从另一个页面访问它
像这样
and access this from another page
like this
text is : session["labeltext"].Tostring();
您可以通过使用查询字符串或使用会话
来完成此操作 通过以下方式:
You can accomplish this through the use of Query Strings or using Session
In the following way:
Response.Redirect("xyz.aspx?label="+label1.text,false);
对于accesig:
for accesig this:
string xyz=Request.QueryString["label"].ToString();
这篇关于如何将标签文本传递到另一个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文