0
Public Sub DropDownList1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DropDownList1.SelectedIndexChanged
Dim comboIndex As Integer
MsgBox(DropDownList1.SelectedIndex)
Dim ddl As DropDownList = Master.FindControl("cmbCulture")
comboIndex = DropDownList1.SelectedIndex
If ddl.SelectedIndex >= 0 Then
'comboIndex = ddl.SelectedValue
End If
MsgBox(DropDownList1.SelectedIndex)
comboIndex = ComboBox1.SelectedIndex
Dim sqlQuery As String
If comboIndex = 1 Then sqlQuery = "SELECT * FROM scale WHERE scaleName = 'Major'"
If comboIndex = 0 Then sqlQuery = "SELECT * FROM scale WHERE scaleName = 'Dominant7'"
sqlQuery = "SELECT * FROM scale"
我需要知道我觸發了從我的內容頁面(默認)在我的母版頁上的下拉列表中的selectedvaluechanged事件。我在代碼中放置了一個消息框,以便我知道它已經到達了那裏,但我無法啓動它。有誰知道如何做到這一點?從內容頁面上的母版頁觸發selectedindexchangedchanged
感謝。我看了一下代碼。我需要在vb.net中的解決方案。也許有一種方法可以輕鬆地翻譯這個C#代碼,但我不知道。 – zoltar