1. //First Of All Drag A Button From The Toolbox In The Window From & Then Put The Server Function In That Click Event….
  2. protected void NewButton_Click(object sender, EventArgs e)
  3. {
  4. ServerFunctionName();
  5. }
  6. //Now You Can Call That Function Using This Javascript Code.... Secondly, you can call the server function at JavaScript by using the following code,
  7. document.getElementById("NewButton").click();