Try something like this; |
| Sujit Patil replied to Sanjay Verma at 05-Jul-08 06:00 |
put one hidden button like
<asp:TextBox ID="txtchange" runat="server" AutoPostBack="true" onchange="javascript:onchange();" OnTextChanged="txtchange_OnChange"></asp:TextBox> <input type="button" runat="server" id="hidbtn" style="display:none;" onserverclick="txtchange_OnChange" />
You can raise the same textchage event in button serverclick.
In clientside do this
function onchange() { if(parseInt(value) > 100) { alert('Amount is greater than 100!'); return false; } else { document.getElementById('hidbtn').click(); return true; }
}
May be this will help you.
Or you can use __doPostBack(textBox.ID,null); also
Best Luck!!!!!!!!!!!! Sujit. |
|