Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asptoday_discuss thread: Accessing a button contol's onCommand method


Message #1 by "Dave Fitzgerald" <david.fitzgerald@i...> on Mon, 4 Mar 2002 16:27:18
I need some help!  I am dynamically generating buttons onto a panel 

control in a web form as shown:

         For Each aColorName In en.GetNames(en.GetType)

                Dim btn As New Button()

                btn.ID = aColorName

                btn.BackColor = System.Drawing.Color.FromName(aColorName)

                btn.CommandName = aColorName

                btn.CommandArgument = aColorName

                pnlColor.Controls.Add(btn)

         Next

Can I programatically access the onCommand" method of these buttons? if 

yes how? if not any alternative suggestions?  I want to use these buttons 

to change the color properties (back, fore, border) of an image control.

thanks

  Return to Index