Label click event

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

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

Label click event

 
0
  #1
Oct 18th, 2009
There is no label click evnet in ASP.net? I want to perform some action on label click . When i double click on it Label1_Load EVent is generated?
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 51
Reputation: Dhaneshnm is an unknown quantity at this point 
Solved Threads: 6
Dhaneshnm's Avatar
Dhaneshnm Dhaneshnm is offline Offline
Junior Poster in Training
 
0
  #2
Oct 18th, 2009
You can add a java script event handler for onclick like:
  1. Label1.Attributes.Add("onclick", "Label1_Click()");/*on pageload,code behind*/

and write javascript like
  1. <script type="text/javascript">
  2. function Label1_Click()
  3. {
  4. alert("clicked");
  5. }
  6. </script>

I dont know wether there is a way to add a conventional event handler
for OnClick for Label.We shall wait for a better solution.
Reply With Quote Quick reply to this message  
Reply

Message:


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