Click here to Skip to main content
15,891,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have one page with dropdownlist. i called another page through selectedindexchange of dropdownlist using response.redirect. it is not working in IE version 9. Please help me
Posted
Updated 19-Aug-11 19:58pm
v2
Comments
angappans 20-Aug-11 2:07am    
did you have pagename in that dropdown listbox
jincyn 20-Aug-11 2:12am    
Protected Sub ddtest_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddtest.SelectedIndexChanged

Response.Redirect("Default3.aspx")
End Sub

<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
onselectedindexchanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem>Default2.aspx</asp:ListItem>
<asp:ListItem>Default3.aspx</asp:ListItem>
</asp:DropDownList>

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Redirect(DropDownList1.SelectedItem.ToString());
}
It is Working
 
Share this answer
 
Comments
jincyn 20-Aug-11 3:01am    
but mycode is like this
<asp:DropDownList ID="ddtest" runat="server" AutoPostBack="True" >
<asp:ListItem Value="0">SELECT
<asp:ListItem Value="1">Country

Protected Sub ddtest_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddtest.SelectedIndexChanged

If ddtest.SelectedItem.Text = "Country" Then
Response.Redirect("Default3.aspx")
end if
End sub
set the autopostback property of dropdownlist to true
 
Share this answer
 
Comments
jincyn 20-Aug-11 2:24am    
already set it to true. it will work in other versions. not wroking in version9
jincyn 20-Aug-11 2:26am    
<asp:DropDownList ID="ddtest" runat="server" AutoPostBack="True" >
<asp:ListItem Value="0">SELECT
<asp:ListItem Value="1">Country

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900