|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
button on user controlHi
I have a user control including a button (and some more stuff). When I use the user control on an asp.net page I would like the button on the user control never to be selected. The problem now is when i press enter the button is pressen. I would like to force the user to use the mouse to press the button. How do I do this? Thanks Julia I've worked around this two ways (as, honestly, I don't know of a way to
truly stop the Enter key from pressing a button. I believe that's a client-size functionality, not server-side): 1. Tie a validation to the button to require that the form cannot be submitted (thus the button not activated) until something occurs on the page. I've read other articles where they've used JavaScript to do something similar. 2. Use ImageButtons and images that look similar to your themed or stylized form buttons. As far as I know, ImageButtons don't activate via the Enter key and you can proceed through your page logic via the ImageButton_Click method. -dl --- David Longnecker Web Developer http://blog.tiredstudent.com Show quoteHide quote > Hi > > I have a user control including a button (and some more stuff). When I > use the user control on an asp.net page I would like the button on the > user control never to be selected. > > The problem now is when i press enter the button is pressen. I would > like to force the user to use the mouse to press the button. How do I > do this? > > Thanks > Julia
FileUpload control - file size detection
Using SkinID for Menu background image. Error Loading UserControl "Failed to load viewstate" when clicking button Get value from textbox in webcontrol Paging in DataGrid does not work 2.. Folder creation error: "Could not find a part of the path" error Need very very good web designer contractor (ASP.NET 2.0 themes) Retrieve value from textbox in webusercontrol Tabstrip rendering Error |
|||||||||||||||||||||||