Quote:
Originally Posted by tim007
I have a textbox placed in a updatepanel, i have written a textChanged event that gets fired when user types something.
Now i have set the enableViewState property of the TextBox to FALSE
<asp:TextBox ID="txtName" runat="server" AutoPostBack="True"
ontextchanged="txtName_TextChanged" EnableViewState="false" CausesValidation="false"></asp:TextBox>
so what happens is on every postback the textChanged event gets fired.
i would like to block this, while i keep the viewstate property of the textbox to false
any solution?
thanks
Tim
Your question doesn't make sense to me.
You have a textbox which has it's ViewState disabled.....
This should have no effect on your textChanged event getting fired.
The TextChanged event will only get fired if your textbox's autopostback is set to true.
When you disable the textbox's ViewState, the textbox will not retain it's value when the postback occurs. This means that you have to always set the textbox's Text property so that this information isn't lost...
Could you please rephrase your question and provide more details on what your problem is?
-Frinny