对于Asp.net C#开发人员
问题描述:
你好,
我在.cs页中设计了一个html文本框,我将如何获取输入的文本框的值
hello,
i design a html text box in .cs page how i will get the value of the text box which i entered
答
您是asp.Net的新手.与此此 [
Are you new to asp.Net. go with this[^] link.
.cs page is called codebehind. here we coollect value of textbox in .cs page
Page.Title = Textbox1.value;
在上面的代码中,我们从文本框中输入了值并将其分配给页面标题.
in above we have entered value from textbox and assign it to Page title.
string strValue = TextBox1.Text
通过这种方式,您会将输入值存储在任何地方
string strValue=TextBox1.Text
from this way u will store the enter value anywhere
string txtvalue=Textbox1.Value;
write code here, the above string will get the textbox value..
write code here, the above string will get the textbox value..