vbnow
Newcomer
I'm looking to create buttons dynamically at run-time. The below code works in ASP with Web Controls. I would like use something equivalent in a windows forms application with click events working.
Dim i As Integer
For i = 1 To txtCreate.Text
Dim objButton As HtmlButton
objButton = New HtmlButton()
objButton.InnerText = "button1" & i
objButton.ID = "btnButtton" & i
myPlace.Controls.Add(objButton)
objButton.Attributes.Add("runat", "server")
Next
any help much appreciated!
Dim i As Integer
For i = 1 To txtCreate.Text
Dim objButton As HtmlButton
objButton = New HtmlButton()
objButton.InnerText = "button1" & i
objButton.ID = "btnButtton" & i
myPlace.Controls.Add(objButton)
objButton.Attributes.Add("runat", "server")
Next
any help much appreciated!