Newbie Question on Textbox

  • Thread starter Thread starter Goran Topic
  • Start date Start date
G

Goran Topic

Hi. I created a form with a Textbox and a Button, and I catch the
OnClick on the Button. But my form is also submitted when I hit Enter on
my Textbox; how do I catch that?

Thanks...
 
in the page load look for

if(IsPostBack())
{.......your stuff;}
 
Goran,

I've created a javascript component that contains many useful javascripts
for .NET including one that clicks the button of your choice when the enter
key is pressed while in a textbox.

It's available, for free (everything on my web site is free), at
www.aboutfortunate.com. Just click on the "code library" link at the top of
the page and then click on the "javascript" button in the menu on the left.
The entire projects source code is there to download so even if you don't
want to use the entire component you can easily extract the source code for
the button click stuff.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top