Set Default Button

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Apr 2008
Posts: 75
Reputation: mansi sharma is an unknown quantity at this point 
Solved Threads: 0
mansi sharma mansi sharma is offline Offline
Junior Poster in Training

Set Default Button

 
0
  #1
Oct 9th, 2009
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?
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 452
Reputation: Ramesh S will become famous soon enough Ramesh S will become famous soon enough 
Solved Threads: 82
Ramesh S Ramesh S is offline Offline
Posting Pro in Training
 
0
  #2
Oct 9th, 2009
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

  1. <form id="form1" runat="server" defaultbutton="button2 ">
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 11
Reputation: nverma is an unknown quantity at this point 
Solved Threads: 2
nverma nverma is offline Offline
Newbie Poster
 
0
  #3
Oct 10th, 2009
set UseSubmitBehaviour =true for button2 and false for button1
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 331 | Replies: 2
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC