X.aspx文件中有如下列表框:
<asp:DropDownList id="DropDownList1" runat="server" AutoPostBack="True">
   <asp:ListItem Value="http://www.xx.com">导航1</asp:ListItem>
   <asp:ListItem Value="http://www.yy.com">导航2</asp:ListItem>
</asp:DropDownList>
请问如何在其后台代码文件X.aspx.vb中实现选择下拉列表项,则在新窗口中打开指定的网址?

解决方案 »

  1.   

    this.DropDownList1.SelectedIndex = 1;
      

  2.   

    C#vb不会private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
    {
    Response.Redirect(this.DropDownList1.SelectedValue.ToString());
    }
      

  3.   

    SelectedIndexChanged 事件
    Response.Write("<script>window.open('"+DropDownList1.SelectedValue+"')</script>");
      

  4.   

    在DropDownList1的SelectedIndexChanged事件中写:
    Response.Redirect(DropDownList1.SelectedValue);你的把X.aspx页form的target属性设置成_blank.
      

  5.   

    button_onclick
    ....this.DropDownList1.SelectedIndex = 1;
    respons.write("<sript>window.open('aaa.aspx')</script>")
      

  6.   

    用response.write("<sript>window.open('aaa.aspx')</script>")
    的方式都是在弹出窗口中打开呀!