I have a drop down list with gridview. When the page loads the option in the drop down is 'select an item'. However the gridview does not load all records when the page is first loaded and the user has not made a selection yet in the drop down. Here is my code:
<asp:dropdownlist id="DropDownList1" runat="server" autopostback="True" önselectedindexchanged="DropDownList1_SelectedIndexChanged">
Select an item
A
B
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
If DropDownList1.SelectedIndex.Equals(0) Then
tabledata.SelectCommand = ("SELECT * FROM
")
End If
End Sub
<asp:dropdownlist id="DropDownList1" runat="server" autopostback="True" önselectedindexchanged="DropDownList1_SelectedIndexChanged">
Select an item
A
B
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
If DropDownList1.SelectedIndex.Equals(0) Then
tabledata.SelectCommand = ("SELECT * FROM
End If
End Sub