Home All Groups Group Topic Archive Search About

PREVENT an ASP.Net page from posting back when the ENTER key press

Author
6 Mar 2006 7:16 AM
Intech
How to PREVENT an ASP.Net page from
posting back when the ENTER key is pressed?
I don't want to use client side script

Thanks

Author
6 Mar 2006 7:17 AM
Intech
I am using one TextBox control inside GridView footer control to insert data.
If I press enter key on that TextBox contol it is now post backing, I want to
somhow prevent that
thanks
Author
6 Mar 2006 4:46 PM
DWS
Intech,
This might help.  Check all the buttons on your form have
usesubmitbehavior="false".

Good Luck
DWS


Show quoteHide quote
"Intech" wrote:

> I am using one TextBox control inside GridView footer control to insert data.
> If I press enter key on that TextBox contol it is now post backing, I want to
> somhow prevent that
> thanks
Author
6 Mar 2006 1:29 PM
Christopher Reed
I do not believe you can do without Javascript.  By pressing the ENTER key,
you are performing a client-side action which triggers a client-side event
(postback).
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

Show quoteHide quote
"Intech" <Int***@discussions.microsoft.com> wrote in message
news:F7388A07-BF00-435D-944F-0331379C00CE@microsoft.com...
> How to PREVENT an ASP.Net page from
> posting back when the ENTER key is pressed?
> I don't want to use client side script
>
> Thanks
>