On Enter Key Press on textbox server-side postback event not getting fired

daupporia

New Member
I've created a web page with textbox control as below -\[code\]<asp:TextBox ID="txtNumber" runat="server" size="5" MaxLength="9" AutoPostBack="True" OnTextChanged="txtNumber_TextChanged" CssClass="txtBoxPage" Style="margin-left: 3px;"></asp:TextBox>\[/code\]I'm facing an issue when pressing enter key in textbox. On Enter key press postback is not occured. Can you please provide me help so that on Enter Key Press, page should get postback and textbox server-side will get fire.I've debug the code and found that the WebForm_TextBoxKeyHandler returns false when the ENTER key is pressed. Below is the rendered code for reference -\[code\]<input type="text" onkeypress="if (WebForm_TextBoxKeyHandler(event) == false) return false;" onchange="javascript:setTimeout('__doPostBack(\'textbox1\',\'\')', 0)" ... />\[/code\]Thanks in advance.
 
Back
Top