More Group Sites
Education Books
School Rankings
Jobless Net
Better Home
Enviro++
更好教育论坛


Help | Subscribe/Unsubscribe | Rules | Other Group Sites: Better Education | Better Education Forum
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Share
Options
View
Go to last post Go to first unread
hong  
#1 Posted : Saturday, 30 April 2016 9:53:21 PM(UTC)
hong

Rank: Administration

Reputation:

Groups: AcademicCoachingSchool, admin, Administration, BookSeller, CatholicSchool, CoachingAdult, CoachingProfessional, CoachingSports, ExtraCurriculumCoaching, IndependentSchool, Moderator, MusicTeacher, PrivateSchool, PublicSchool, SelectiveSchool, tutor
Joined: 23/11/2008(UTC)
Posts: 519

Have multiple default buttons on an ASP.NET form

By default, an ASP.NET button is set to UseSubmitBehaviour. On pressing Enter key, the default button click or command event handler is called. In ASP.NET, we can assign a default button for a form or a panel. But in a content page, the form is not available to set the default button because it's in the master page. if the default button is not set, it can be any button on the form. If there are multiple input text boxes (with AutoPostBack set to false) and their associated buttons on the form, this may not be the behaviour you wanted. You may want to have a separate default button for one or more input box. This can be done by placing text boxes in a panel. You set the button as default button of the panel. Then you can have multiple default buttons on a single form. This way you have full control what happens. Please note that the default button only works within the specific panel. If your panels only contains one text box, then Enter key only works within the input control.

Edited by user Sunday, 1 May 2016 7:52:24 PM(UTC)  | Reason: Not specified

Sponsor
Rss Feed  Atom Feed
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.