Hi all fri,

Is it possible to have 2 (button_click) events in a same namespace?
I need answer in super urgent :)

who wants to help me ??????
Thanks million :)

Recommended Answers

All 3 Replies

Sure, if you have two buttons, each can have a click event.

> Is it possible to have 2 (button_click) events in a same namespace?
Not with the same name, and the designer does not allow it, but programmatically you can sink multiple handlers for an event. They will run in sequence when the event is fired.

button.Click += new EventHandler(button_Handler1);
button.Click += new EventHandler(button_Handler2);

Thanks you all fri. now i got it :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.