How do you register JavaScript for webcontrols ? | Eklavya Online

How do you register JavaScript for webcontrols ?

We can register javascript for controls using Attribtues.Add(scriptname,scripttext) method.