Answer: Write below Javascript function and call below function on
onkeydown event in textbox definition as:-
function prevent_submission()
{
return (event.keyCode!=13);
}
<asp:TextBox ID="txt_emp_first_name" runat="server" onkeydown = "prevent_submission();"></asp:TextBox>
Asked In: Many Interviews |
Alert Moderator