hi guys,
First,I create buttons dynamically and its succeeded...
My code;
Dim btn As Button = New Button
btn.Text = "hello"
btn.ID = "btnhello"
Then i need to add image on it,so far i am not able to do it with normal button, but i succeeded with image button
My Code;
Dim mybutton As ImageButton = New ImageButton
mybutton.ID = "btn1"
mybutton.ImageUrl = "~/images.jpg"
but, i can not add text on it...
i add these buttons in to "Panel"
My Code;
Panel1.Controls.Add(mybutton)
My question is, How to add image and text on button Dynamically?
Following coding are not work for me;
// Positon
myButton.Left = 100 //btn.Left=100//error saying Left is not a member "System.web.ui.webcontrols.button"
myButton.Top = 100 //btn.Top=100//error saying Top is not a member "System.web.ui.webcontrols.button"
myButton.Location = new Point(Left, Top)//btn.Location=new Point(Left,Top)//error saying Location is not a member "System.web.ui.webcontrols.button"