Which of the following is the correct syntax for an event handler for a Button control in ASP.NET?

128. Which of the following is the correct syntax for an event handler for a Button control in ASP.NET?

  1. protected void MyButton_Click(object sender, EventArgs e){  } 
  2. protected void MyButton_Click(EventArgs e){  } 
  3. protected void MyButton_Click(object sender){  } 
  4. protected void MyButton_Click(){  }

Answer: A) protected void MyButton_Click(object sender, EventArgs e){  } 

Explanation:

The 1st syntax is correct to implement an event handler for a Button control in ASP.NET.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.