Home »
MCQs »
ASP.Net MCQs
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?
- protected void MyButton_Click(object sender, EventArgs e){ }
- protected void MyButton_Click(EventArgs e){ }
- protected void MyButton_Click(object sender){ }
- 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.