A
ad
If TextBox1 is a control on a WebForm, we can add Javascript function by
adding attribute in the Page_Load event like:
protected void Page_Load(object sender, EventArgs e)
{
TextBox1.Attributes.Add("onclick", "return MyFunction('Tiger')");
}
But if the TextBox is in a template, How can we add the attributes with
codes?
adding attribute in the Page_Load event like:
protected void Page_Load(object sender, EventArgs e)
{
TextBox1.Attributes.Add("onclick", "return MyFunction('Tiger')");
}
But if the TextBox is in a template, How can we add the attributes with
codes?