I guess filling the combo with values from db is pretty simple. No matter which platform u r from.
i am putting one example here... i hope it wud help u
in aspx page:
<asp

ropDownList Runat="server" ID="cboPageTitle" DataTextField="PM_Name" DataValueField="PM_ID" />
In code behind:
Private Sub LoadPageTitleCombo()
Try
'stores dataview of pages
Dim dvPages As DataView
'store datatable of pages
Dim dtPages As DataTable
'constant to store
Const SP_PAGE_MASTER_LIST = "spPage_Master_List"
'Stores Connection object
Dim objConnection As SqlConnection
'initialization of connection object
objConnection = New SqlConnection()
'stores command object
Dim objCommand As New SqlCommand()
'setting command object's properties
objCommand.CommandType = CommandType.StoredProcedure
objCommand.CommandText = SP_PAGE_MASTER_LIST
'Assign the connection string to the connection object.
objConnection.ConnectionString = Convert.ToString(ConfigurationSettings.AppSettings("ConnectionString"))
'Open the connection
objConnection.Open()
'associate connection with command
objCommand.Connection = objConnection
'adapter object
Dim objDataAdapter As SqlDataAdapter
'Execute the query
objDataAdapter = New SqlDataAdapter(objCommand)
'initializating dataview
dvPages = New DataView()
'initializing datatable
dtPages = New DataTable()
'get the pages
objDataAdapter.Fill(dtPages)
'Close connection object
objConnection.Close()
'Set nothing in the connection object
objConnection = Nothing
'get the list of pages
dvPages = dtPages.DefaultView
'bind the dataview with combo
cboPageTitle.DataSource = dvPages
cboPageTitle.DataBind()
'insert default selected value
cboPageTitle.Items.Insert(0, New ListItem("-- Select --", "0"))
Catch objException As Exception
mstrErrorMessage = objException.Message
End Try
End Sub
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'if page is loaded for first time
If Not Page.IsPostBack Then
'load page titles in combo
LoadPageTitleCombo()
End If
End Sub
Rakhi