Pages

How to call single click_ event for all buttons on a page

  • First Drag a button on a .aspx page and double click on the button then click event in generated in .cs page
  • Copy eventname (MyButton_click)
  • Drag another button on to a page goto properties windows for the button.
  • click on event list of the properties window go to click event property paste eventname (MyButton_click)
  • In this we can call the same event of for all buttons
  • You can do same for other Controls