Adding Javascript Attributes

There are two ways to add Javascript attributes to a particular ASP.Net Server control:

  • button1.Attributes.Add(“OnClick”, “document.form1.txtName.focus();”)
  • button1.Attributes(“OnClick”)=”document.form1.txtName.focus();”
  • Related Posts:

    • No Related Posts
    Twitter Digg Delicious Stumbleupon Technorati Facebook Email

    No comments yet... Be the first to leave a reply!