Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<asp:textbox>

Status
Not open for further replies.

digiduck

Programmer
Apr 4, 2003
95
0
0
US
is there a way to make it so that when the user has the focus on an <asp:textbox> object that when they hit the enter key it won't do anything?

Thanks

Gone looking for myself. Should I arrive before I'm back, keep me here.
 
You could output a little javascript to handle it.

<script type=&quot;text/javascript&quot;><!--
function handleEnter() {
return !(window.event && window.event.keyCode == 13); }
//--></script>

with an onKeypress on your textbox like so...
onkeypress=&quot;return handleEnter();&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top