Adding a Button to a Horizontal Menu
To programmatically add a button control to a horizontal C1WebMenu, use the following code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim btn As Button = New Button
btn.Text = "Go!"
C1WebMenu1.Controls.Add(btn)
End Sub
• C#
private void Page_Load(object sender, System.EventArgs e)
{
Button btn = new Button();
btn.Text = "Go!";
C1WebMenu1.Controls.Add(btn);
}
|