Nooooooo ...

That is just about the least-flexible way to possibly do this. What if
you add buttons? What if you add buttons early on in the sequence?
Which mechanism fails more gracefully in the event of error when
adding buttons?

∞ Andy Badera
∞ +1 518-641-1280
∞ This email is: [ ] bloggable [x] ask first [ ] private
∞ Google me: http://www.google.com/search?q=andrew%20badera



On Tue, Oct 13, 2009 at 12:10 AM, Awadhendra Tiwari
<[email protected]> wrote:
>
> write down the following code---
>
> protected void button1_click(Object sender,EventArgs e)
> {
>     Button b=(Button)sender;
>     if(b==b1[0])//here b1[0],b1[1] are the array on which u create
> the button array
>     {
>     //Perform the action for the first button
>     }
>     if(b==b1[1])
>     {
>        //perform the action for the second buton
>      }
>      ////and co on
> }
>

Reply via email to