Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Enter in textbox causes bad postback

Reply
Thread Tools

Enter in textbox causes bad postback

 
 
=?Utf-8?B?VG9ueSBIZWRnZQ==?=
Guest
Posts: n/a
 
      09-22-2004
Hello,
I can briefly explain without providing any code, it's a simple NET 1.1 web
project.

I have a web form with a textbox A and button A (in a table row), and
textbox B and button B (in a second table row). The textboxes are of type
asp:Textbox and buttons are asp:Button. Autopostback=false for textboxes.
Click event used for the buttons.

When user types in text in textbox B and hits Enter, the click event for
button A fires!!! Why, what is causing this to happen? I would like some
way to make button B fire instead, so I set the tabindex attributes on each
of the 4 controls above to try and provide that functionality but it didn't
work. the event for button A always fires when I ht enter.

When I added textbox C and button C, etc... the same darn thing!!! How can
I at least turn off this behavior so that when Enter is hit no postback
occurs? I set autopostback to false for the textboxes but this didn't do
anything.

Thanks in advance- Hedge
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable imagebutton postback when i enter "enter" =?Utf-8?B?am9l?= ASP .Net 0 09-28-2006 06:46 AM
capturing from text area Shft+Enter, Control+Enter, Alt+Enter and browser issue. HopfZ Javascript 0 08-28-2006 10:11 AM
Pressing <ENTER> in text input control causes a postback ! peshrad ASP .Net 4 08-26-2005 02:32 PM
Re: Enter in textbox causes bad postback vMike ASP .Net 1 09-22-2004 08:17 PM
RE: Enter in textbox causes bad postback =?Utf-8?B?RGVtZXRyaQ==?= ASP .Net 1 09-22-2004 08:11 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57