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?

You can add a java script event handler for onclick like:

Label1.Attributes.Add("onclick", "Label1_Click()");/*on pageload,code behind*/

and write javascript like

<script type="text/javascript">
function Label1_Click()
    {
      alert("clicked");
    }
</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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.