如何在变量中存储文本框数据 [英] how to store textbox data in variable
本文介绍了如何在变量中存储文本框数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨我正在使用visual studio2008,
和商店数据
textbox.text =< abc> ;;
但它的抛出错误,我如何在文本框中添加此类型数据,或者如果我想在运行时替换或添加其他符号,我如何添加此
textbox.text = \< abc \>
请帮助
hi i am useing visual studio2008,
and store data
textbox.text=<abc>;
but its throw error, how i add this type data in textbox or if i want to replace or add some other symbol in run time, how i add this
textbox.text=\<abc\>
please help
推荐答案
如果你想在运行时添加任何数据然后在页面加载
textBox1.text =abc;
if you want to add any data on runtime then on pageload
textBox1.text="abc";
你好专业
简单好友
最重要的事情总是使用引号直接存储字符串值
首先定义一个字符串日期类型变量和
保存它的值
喜欢
字符串值=\< abc \>;
然后
textbox.text =价值;
或者您可以直接保留价值你在哪里这样..
textbox.text =\< abc \>;
任何查询坦率地告诉我
乐于助人!!!
hello Professional
Simple Buddy
The Most Important Thing always Use "" quotes for Storing String Values Directly
First Define a String Date type variable and
hold the value on it
like
String Value="\<abc\>";
and then
textbox.text=Value;
Or You Can Directly Hold the value from where u getting like this..
textbox.text="\<abc\>";
any Query Frankly Let me know
Happy To Help!!!
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
textbox.Text = "Enter Your Name Here";
}
这篇关于如何在变量中存储文本框数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文