944,022 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Marked Solved
  • Views: 628
  • ASP.NET RSS
Oct 9th, 2009
0

Set Default Button

Expand Post »
Suppose there are two buttons named button1 & button2.I wnat that when the user presses enter key,button2 click event will fire? How to do dat,Can somebody tell me?
Similar Threads
Reputation Points: 17
Solved Threads: 0
Junior Poster in Training
mansi sharma is offline Offline
75 posts
since Apr 2008
Oct 9th, 2009
0
Re: Set Default Button
It can be done by setting default button property at page level.

The defaultbutton property can be specified at the Form level in the form tag

ASP.NET Syntax (Toggle Plain Text)
  1. <form id="form1" runat="server" defaultbutton="button2 ">
Reputation Points: 165
Solved Threads: 113
Posting Pro
Ramesh S is offline Offline
580 posts
since Jun 2009
Oct 10th, 2009
0
Re: Set Default Button
set UseSubmitBehaviour =true for button2 and false for button1
Reputation Points: 10
Solved Threads: 2
Newbie Poster
nverma is offline Offline
21 posts
since May 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: AJAX in asp.net2.0
Next Thread in ASP.NET Forum Timeline: datareader in While loop





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC