To call the javascript functions using .Net control (on click)
At first ,we should register this event in the class. I usually put this kind of event registration in PageLoad() method. So it can be called when the page is loaded.
Take OnClick event as an example. Just like this, it very easy.
btnSave.Attributes.Add("OnClick","javascript:return fnGeneralvalidate(this);");
This is the Formula we must to follow.
[control_ID].Attributes.Add(“[Event Name]”,”javascript: return [Function name]”);
As is shown above, all things we should do is to remember the control ID and write the Javascript.This javascript should have been linked to the page we edit.