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

Explain the role of assembly in the .net framework.

663


How does the 'page lifecycle' of asp.net mvc works?

664


Explain ASP.NET MVC Identity and Security?

645


What you mean by routing in asp.net mvc?

633


What is entity framework used for?

627






will there be any issues adding a table without primary keys to a data model?

687


What is MVVM design pattern?

682


Which are the important namespaces used in mvc?

801


What is the use of action filters in an mvc application?

721


Is dapper better than entity framework?

633


How to enable Attribute Routing?

717


What is .net framework used for?

671


What is the difference between tempdata and viewbag?

582


What are the new enhancements done in default project template of asp.net mvc 4?

656


What is filters in web api?

594