从文本框中检索值 [英] Retrieve value from textbox
本文介绍了从文本框中检索值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将texbox的值用于另一种形式,如何在不使用会话的情况下获取该值.我写了这个但没用:
string act = Request.Form ["TextBox1"];
I want to use value of the texbox to another form how can i get this value,without using session. i write this but not working:
string act = Request.Form["TextBox1"];
推荐答案
在做 ^ ]会有所帮助:
MSDN:ASP.NET状态管理概述 [ ASP.NET中的状态管理-1 [ ASP.Net状态管理技术-2 [
Doing this[^] would had helped a lot:
MSDN: ASP.NET State Management Overview[^]
State management in ASP.NET - 1[^]
ASP.Net State Management Techniques - 2[^]
Read and then try!
最好在首页中使用查询字符串
response.redirect("secondpage.aspx?id =''" Textbox1.text''");
在第二页,即您要获得文本框值的哪一页
字符串str = request.querystring ["id"].ToString();
我认为这对您有帮助...
better use querystring in first page
response.redirect("secondpage.aspx?id=''"Textbox1.text"''");
in second page i.e. which page u want to get text box value
string str=request.querystring["id"].ToString();
i think this will help u...
这篇关于从文本框中检索值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文