Author: travisb | Posted on: 6/28/2004 9:39:18 AM | Views : 489

Is there a way to copy/clone a control such as a button? I'm adding a new button to a panel and would like to add the same button to another panel on the page.





Dim mybutton1 as New Button


Dim mybutton2 as New Button


mybutton1.ID="mybutton1"


mybutton1.Text="Click Me"


mybutton2=mybutton1


mybutton2.ID="mybutton2"





The above code doesn't work. When adding both buttons to their respective panels, only the last button added will actually be added to the page.





...

Go to the complete details ...