problem in gettin seletedindex changed event of a drop down inside a data list

Last post 05-17-2008 5:10 AM by vinesh k velaga. 1 replies.

Sort Posts:

  • problem in gettin seletedindex changed event of a drop down inside a data list

    05-17-2008, 3:42 AM
    • Loading...
    • suvo
    • Joined on 11-14-2007, 11:09 AM
    • Posts 99

    i have  drop down inside a data list.i want to redirect to another page on seleted index change of drop down with the seleted item..can any body help me...all the items of drop down r populated from db

  • Re: problem in gettin seletedindex changed event of a drop down inside a data list

    05-17-2008, 5:10 AM
    Answer

    ASPX
    <asp:DropDownList ID="DropDownList1" runat="server"
            OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" AutoPostBack="true">
    </asp:DropDownList>

     

    C#
     protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            Response.Redirect("http://www.google.com?" + DropDownList1.SelectedValue);
        }

     

     

     

     


    ------------------------------------------------------------------------------------------------
    Don't forget to click "Mark as Answer" on the post that helped you. 

Page 1 of 1 (2 items)