
c# 在一个文本框输入内容 根据内容带出所有信息 并显示在页面上
2个回答
展开全部
使用文本框的TextChanged事件,并且这个文件框的AutoPostBack属性要为True。
象这样写:
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
Label1.Text = Server.HtmlEncode(TextBox1.Text);
}
这样TextBox1中输入的内容就显示在页面上的Label1中了。
象这样写:
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
Label1.Text = Server.HtmlEncode(TextBox1.Text);
}
这样TextBox1中输入的内容就显示在页面上的Label1中了。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询