Can you handle all button click events at once in a form?
Give coding.

Answer Posted / seema dalal

suppose ,there r 3 buttons & we have to handle all button
click events at once. Then try following steps
1) Write eventhandler

Public Sub clickevent(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click, Button2.Click,
Button3.Click
Dim b As Button = CType(sender, Button)
Response.Write("hello:" & b.Text)
End Sub
2) then call this event handler on click event of eech
buttons.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between ASP.NET MVC and ASP.NET WebForms?

566


What is entitycontainer? : Entity framework

583


Does Tempdata hold the data for other request in ASP.Net MVC?

542


What is difference between viewbag and viewdata and tempdata?

533


Explain what is routing?

518






What is the meaning of unobtrusive javascript?

555


Which approach provides better support for test driven development - asp.net mvc or asp.net webforms?

507


Explain the methods used to render the views in mvc?

549


How do you specify comments using razor syntax?

601


what is complex type?

597


What is ViewData and TempData in ASP.Net MVC?

577


Give an example for authorization filters in an asp.net mvc application?

536


What is the advantage of using asp.net routing?

595


What are ajax helpers in asp.net mvc?

593


What is viewbag title?

529