combobox select index changed put it in sessions in master page
<p>can u explain what can i do with the combobox of master page i set database names in combobox and i call through child pages
the code is below
Try</p>

<pre><code>        sqlConn = New SqlConnection(strConn)
        sqlConn.Open()
        Dim sqlda1 As SqlClient.SqlDataAdapter
        Dim sqlds1 As New DataSet

        sqlQry = "EXEC sp_databases"
        sqlda1 = New SqlDataAdapter(sqlQry, sqlConn)
        sqlda1.Fill(sqlds1, "DataBaseList")
        sqlConn.Close()
        Session.Add("dscb", " ")
        Session.Add("dscb", sqlds1.Tables("DataBaseList"))

        Dim IntPCount As Integer

        IntPCount = sqlds1.Tables("DataBaseList").Rows.Count
        'IntPCount = Session("dscb")
        Dim PCol As String
        ' cbDataBaseList.Items.Clear()
        cbDataBaseList.Items.Clear()
        cbDataBaseList.Text = "Select"

        For p = 0 To IntPCount - 1
            PCol = sqlds1.Tables("DataBaseList").Rows(p).Item("DATABASE_NAME").ToString
            If PCol.Length &gt; 5 Then
                If PCol &lt;&gt; "master" Or PCol &lt;&gt; "msdb" Or PCol &lt;&gt; "tempdb" Then
                    Dim strDataBaseName As String = PCol
                    strDataBaseName = strDataBaseName.Remove(4)
                    '*** Add only "Customer's" which got the prefix "CLT_ " ***
                    If strDataBaseName = "CLT_" Then
                        NewPCol = PCol.Replace("CLT_", "")
                        NewPCol.Trim()
                        'cbDataBaseList.Items.Add(NewPCol)
                        cbDataBaseList.Items.Add(NewPCol)
                    End If
                End If
            End If
        Next
                Session.Add("CMBID", "")

        'cbDataBaseList.Text = NewPCol.ToString

        sqlds1.Dispose()
    Catch ex As Exception
        strex = ex.Message
        'MessageBox.Show(strex, "General form exception message 5.", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End If
</code></pre>

<p>select index changed event</p>

<p>Session("CMBID") = cbDataBaseList.Text</p>
