Now in the Code Behind, use the Control.Attributes.Add() to add the OnClick event to the Label Control
C#
protected void Page_Load(object sender, EventArgs e)
{
Label1.Attributes.Add("onClick", "CallMe();");
}
VB.NET
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Label1.Attributes.Add("onClick", "CallMe();")
End Sub
No comments:
Post a Comment