|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Basic questionHi,
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 <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 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. -- Show quoteHide quoteHTH, 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 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 > > I seem to recall mentioning something about that somewhere...
-- Show quoteHide quoteHTH, Kevin Spencer Microsoft MVP ..Net Developer We got a sick zebra a hat, you ultimate tuna. "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 >> >> > >
Gridview - conditional formatting
What should I do webapp or webservice + webapp? Passing nulls to cmd parameters Web service that is able to receive a xml "POST" and process it Issues With User Control Embedded Into Web Page Since Installing .NET 2.0 "Failed to access IIS metabase" on XP Basic ASP.NET application scope question Internet - Intranet Data Dilema Process continues after stop Anyone have the secret to Layout Position on web pages? |
|||||||||||||||||||||||