Home All Groups Group Topic Archive Search About
Author
9 Feb 2006 7:15 PM
gralet
Hi,
How can I make a default button in asp.net for a web form? (when I press
ENTER it calls the event click of the button) thnks.
--
__________________
Luis Graillet Ramos

Author
9 Feb 2006 7:32 PM
Alex D.
<body>

<form id="form1" runat="server" defaultbutton="Button1">



Show quoteHide quote
"gralet" <gra***@discussions.microsoft.com> wrote in message
news:57DBEA00-155F-4D68-8C79-9B1EAA5EA6E8@microsoft.com...
> Hi,
> How can I make a default button in asp.net for a web form? (when I press
> ENTER it calls the event click of the button) thnks.
> --
> __________________
> Luis Graillet Ramos
Are all your drivers up to date? click for free checkup

Author
9 Feb 2006 7:36 PM
Kevin Spencer
That would be the Submit button. However, unless the cursor is in a form
field, it will not be fired. To do that, you would have to handle the
KeyDown event for the document object in the HTML DOM.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
We got a sick zebra a hat,
you ultimate tuna.


Show quoteHide quote
"gralet" <gra***@discussions.microsoft.com> wrote in message
news:57DBEA00-155F-4D68-8C79-9B1EAA5EA6E8@microsoft.com...
> Hi,
> How can I make a default button in asp.net for a web form? (when I press
> ENTER it calls the event click of the button) thnks.
> --
> __________________
> Luis Graillet Ramos
Author
9 Feb 2006 7:49 PM
Alex D.
thats correct. though normally you need to submit the page after entering
some data in a form  field, so the cursor or focus will be in a form field
most of the time.

Show quoteHide quote
"Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message
news:uNgDlAbLGHA.1028@TK2MSFTNGP11.phx.gbl...
> That would be the Submit button. However, unless the cursor is in a form
> field, it will not be fired. To do that, you would have to handle the
> KeyDown event for the document object in the HTML DOM.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> We got a sick zebra a hat,
> you ultimate tuna.
>
>
> "gralet" <gra***@discussions.microsoft.com> wrote in message
> news:57DBEA00-155F-4D68-8C79-9B1EAA5EA6E8@microsoft.com...
>> Hi,
>> How can I make a default button in asp.net for a web form? (when I press
>> ENTER it calls the event click of the button) thnks.
>> --
>> __________________
>> Luis Graillet Ramos
>
>
Author
9 Feb 2006 10:45 PM
Kevin Spencer
I seem to recall mentioning something about that somewhere...

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
We got a sick zebra a hat,
you ultimate tuna.


Show quoteHide quote
"Alex D." <alexwar***@hotmail.com> wrote in message
news:%23FEnZIbLGHA.3196@TK2MSFTNGP09.phx.gbl...
> thats correct. though normally you need to submit the page after entering
> some data in a form  field, so the cursor or focus will be in a form field
> most of the time.
>
> "Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message
> news:uNgDlAbLGHA.1028@TK2MSFTNGP11.phx.gbl...
>> That would be the Submit button. However, unless the cursor is in a form
>> field, it will not be fired. To do that, you would have to handle the
>> KeyDown event for the document object in the HTML DOM.
>>
>> --
>> HTH,
>>
>> Kevin Spencer
>> Microsoft MVP
>> .Net Developer
>> We got a sick zebra a hat,
>> you ultimate tuna.
>>
>>
>> "gralet" <gra***@discussions.microsoft.com> wrote in message
>> news:57DBEA00-155F-4D68-8C79-9B1EAA5EA6E8@microsoft.com...
>>> Hi,
>>> How can I make a default button in asp.net for a web form? (when I press
>>> ENTER it calls the event click of the button) thnks.
>>> --
>>> __________________
>>> Luis Graillet Ramos
>>
>>
>
>



Post Thread options