jacktripper
Programmer
If seen tons of posts about a dropdown event that DOESNT fire, but...
In my case the event is firing for SelectedIndexChanges or TextChanged, but the SelectedValue and SelectedIndex doesn't... Which makes absolutely no sense to me.
So, how can my event be firing, but the selected index and values don't? What am I missing?
Its a simple DDL:
<aspropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
<asp:ListItem>Status Changed</asp:ListItem>
<asp:ListItem>Page Name</asp:ListItem>
<asp:ListItem>Status</asp:ListItem>
<asp:ListItem>Changed By</asp:ListItem>
<asp:ListItem>Date Published</asp:ListItem>
</aspropDownList>
And the event is (this shows TextChanged, but I've tried SelectedIndexChange and that does the same thing - nothing):
Protected Sub DropDownList1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles DropDownList1.TextChanged
Dim thisIndex As Integer = DropDownList1.SelectedIndex
Dim SortBy As String = DropDownList1.Text
Response.Redirect("ListOfPages.aspx?SortBy=" & DropDownList1.SelectedValue)
End Sub
In my case the event is firing for SelectedIndexChanges or TextChanged, but the SelectedValue and SelectedIndex doesn't... Which makes absolutely no sense to me.
So, how can my event be firing, but the selected index and values don't? What am I missing?
Its a simple DDL:
<aspropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
<asp:ListItem>Status Changed</asp:ListItem>
<asp:ListItem>Page Name</asp:ListItem>
<asp:ListItem>Status</asp:ListItem>
<asp:ListItem>Changed By</asp:ListItem>
<asp:ListItem>Date Published</asp:ListItem>
</aspropDownList>
And the event is (this shows TextChanged, but I've tried SelectedIndexChange and that does the same thing - nothing):
Protected Sub DropDownList1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles DropDownList1.TextChanged
Dim thisIndex As Integer = DropDownList1.SelectedIndex
Dim SortBy As String = DropDownList1.Text
Response.Redirect("ListOfPages.aspx?SortBy=" & DropDownList1.SelectedValue)
End Sub