I need to clear/ reset my textbox1 which is set to ReadOnly= “true”. I used a textchanged event in another Textbox2 to calculate a value for the Textbox1. The value in Textbox2 is not cleared on Reset. Any suggestions ??..
My code for reset
function resetForm($form) {
$form.find('input:text, input:password, input:file, select').val('');
$form.find('input:checkbox')
.removeAttr('checked').removeAttr('selected');
}
my aspx code
<asp:TextBox ID="TextBox2" runat="server" ReadOnly="true" />
<asp:TextBox ID="Textbox1" runat="server" OnTextChanged="Textbox1_TextChanged" AutoPostBack="true"></asp:TextBox>
Your issue here is that you probably not call the function
resetFormwith the correct form value. Because on asp.net there is usually only one form you can remove the form parametres and make your reset as:[*] tested and working