Home All Groups Group Topic Archive Search About

problem with the AutoPostBack property

Author
22 Nov 2005 12:02 PM
Mariame
I'm making web pages using VB.Net , the problem is, the AutoPostBack
property of a texbox works only when i press tab, i want it to work when i
press enter instead . . .
this is because i'm usisg a barcode reader that reads barcodes directly in
the textbox, but the codes are read followed by an enter, and i want a
certain code to run by this enter .

thx

Author
22 Nov 2005 6:11 PM
Phillip Williams
Hi Mariame:

To associate a textbox with a specific post back event you can use
JavaScript to associate pressing the Enter key with a button on your page
(that is turned invisible using CSS attribute display=none).   To associate
pressing the Enter Key within any textbox to a button on the page you need to
use JavaScript as in this sample:
http://www.societopia.net/samples/ASPPage_Buttons.aspx


Show quoteHide quote
"Mariame" wrote:

> I'm making web pages using VB.Net , the problem is, the AutoPostBack
> property of a texbox works only when i press tab, i want it to work when i
> press enter instead . . .
> this is because i'm usisg a barcode reader that reads barcodes directly in
> the textbox, but the codes are read followed by an enter, and i want a
> certain code to run by this enter .
>
> thx
>
>
>