On textbox OnTextChanged event the postback cycle triggering twice. Breakpoints on both methods to understand the issue. Here is my code sample

<form id="form1" runat="server">
        <asp:TextBox runat="server" ID="TextBox1" OnTextChanged="TextBox1_TextChanged" AutoPostBack="true" />
    <asp:Label ID="Label1" runat="server"></asp:Label>

Its code behind.

     public static int cycle { get; set; }
     protected void Page_Load(object sender, EventArgs e)

     protected void TextBox1_TextChanged(object sender, EventArgs e)
        Label1.Text = cycle.ToString(); 

Related posts

Recent Viewed