在ASP.NET浏览器禁用时,TextBox textchanged事件无效/未触发

时间:2015-11-09 21:01:41

标签: c# asp.net

click here for more details 如果浏览器JavaScript启用/禁用,我的网页应该有效。

如果浏览器JavaScript禁用,那么我必须进行某种复杂的验证。

当浏览器JavaScript禁用TextBox时,textchanged事件无效/未在asp.net中触发

1)Page Language =“C#”AutoEventWireup =“true”CodeBehind =“WebForm1.aspx.cs”Inherits =“NoJavaScript.WebForm1”

2)表格id =“form1”runat =“server”autocomplete =“off”

3)asp:TextBox ID =“TextBox1”runat =“server”AutoPostBack =“true”OnTextChanged =“TextBox1_TextChanged”EnableViewState =“true”

protected void TextBox1_TextChanged(object sender, EventArgs e)

    {

        TextBox2.Text = TextBox1.Text;

    }

当浏览器JavaScript启用TextBox textchanged事件在asp.net中正在工作/触发时

我们非常感谢您的支持/建议。 谢谢 Pradan Prasant Kumar。

1 个答案:

答案 0 :(得分:0)

<asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True" OnTextChanged="TextBox1_TextChanged"></asp:TextBox>