943,996 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 874
  • ASP.NET RSS
Oct 18th, 2009
0

Label click event

Expand Post »
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?
Similar Threads
Reputation Points: 17
Solved Threads: 0
Junior Poster in Training
mansi sharma is offline Offline
75 posts
since Apr 2008
Oct 18th, 2009
0
Re: Label click event
You can add a java script event handler for onclick like:
ASP.NET Syntax (Toggle Plain Text)
  1. Label1.Attributes.Add("onclick", "Label1_Click()");/*on pageload,code behind*/

and write javascript like
ASP.NET Syntax (Toggle Plain Text)
  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.
Reputation Points: 22
Solved Threads: 7
Junior Poster in Training
Dhaneshnm is offline Offline
52 posts
since Mar 2009

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: session counter
Next Thread in ASP.NET Forum Timeline: Gridview with dynamic rows(Different controls in each row) in asp.net





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


Follow us on Twitter


© 2011 DaniWeb® LLC