Re: dropdown SelectedValue

  •  02-28-2007, 2:07 PM

    Re: dropdown SelectedValue

    I am not sure, why this example is not working for me. My drop down is empty when I use the following code.
     

    If Not objCuteEditor.ToolControls("Number") Is Nothing Then

    Dim container As System.Web.UI.Control

    container = objCuteEditor.ToolControls("Number").Control

    Dim ddlTemplates As DropDownList = New DropDownList

    'ddlTemplates.CssClass = "~/styles/AcmsMain.css"

    'ddlTemplates.ToolTip = "Select Template"

    'ddlTemplates.Items.Insert(0, New ListItem("Template", ""))

    ddlTemplates.Items.Add(New ListItem("1", ""))

    ddlTemplates.Items.Add(New ListItem("2", ""))

    ddlTemplates.Items.Add(New ListItem("3", ""))

    ddlTemplates.Items.Add(New ListItem("4", ""))

    ddlTemplates.Items.Add(New ListItem("5", ""))

    ddlTemplates.Items.Add(New ListItem("6", ""))

    ddlTemplates.Items.Add(New ListItem("7", ""))

    ddlTemplates.Items.Add(New ListItem("8", ""))

    container.Controls.Add(ddlTemplates)
     
    End if
     
    Any help will be much appreciated.
     
    Sam
     
View Complete Thread