how to restruct keypress event textbox

Apr 28 2016 3:09 PM
hi friends how to restruct keypress in textbox (i mean to avoid manual keypress) here i posted my code actually  i restructed  keypress event pageload using jquery..but  i want when ever user enter textbox we have to restucted keypress plz  give me quick reply.
 
<asp:TextBox runat="server" ID="txtDOB"  Enabled="false"></asp:TextBox>
<asp:CalendarExtender runat="server" ID="CalDOB" Format="dd/MM/yyyy" TargetControlID="txtDOB" />
<asp:RequiredFieldValidator runat="server" ControlToValidate="txtDOB" ID="reqDOB" Display="None"
ErrorMessage="Required Date Of Birth" ValidationGroup="emppersonel" ValidateRequestMode="Enabled"></asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender runat="server" ID="ValidatorCalloutExtender1" TargetControlID="reqDOB"
HighlightCssClass="highlightReq">
</asp:ValidatorCalloutExtender>
 
 
 
 heremy jquerycode
.................................
$(document).ready(function ($) {
$('#<%=txtDOB.ClientID%>').keypress(function () {
return false;
});
......................
above code is working pageload textbox keypress restructed .but my requirement is i have to restructed anytime(the text box is callenderextender i meen we have to select date by using calenderextender)
 
 
 
 
 
 

Answers (1)