Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default button in asp.net (Master Page)?

Tags:

asp.net

in my web application i have a master page and i want to implement defaultbutton for a login page when user press enter (my application has Master page) how can i place default button.

like image 440
Surya sasidhar Avatar asked Feb 06 '10 11:02

Surya sasidhar


People also ask

What is a default button?

In a GUI (graphical user interface), such as in Microsoft Windows, the default button is the button chosen if you press Enter on the keyboard. This button represents the option you are most likely to choose, or which is safest to choose if you press Enter accidentally.

What is button in asp net c#?

Button Type in ASP.NET Button ControlButton is used as normal click button, submitting form data, resetting the form data to its initial value. According to the usage of button, you can render the button in three types. By using the Type property, you can easily render the button in following types.

Which are the three types of buttons provided by ASP Net?

ASP.NET provides three types of button control: Button : It displays text within a rectangular area. Link Button : It displays text that looks like a hyperlink. Image Button : It displays an image.


1 Answers

Page.Form.DefaultButton = crtlLoginUserLogin.FindControl("LoginButton").UniqueID

or just

Page.Form.DefaultButton = LoginButton.UniqueID

This will work.

like image 188
FiveTools Avatar answered Sep 24 '22 23:09

FiveTools