高手帮帮忙了。
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        DropDownList dll = (DropDownList)this.DataList1.FindControl("DropDownList1");
        Response.Redirect(dll.SelectedValue);
    }
这个DropDownList1是内嵌在DataList1下的,我想获取到这个DropDownList1的选中值,不知道有无办法实现

解决方案 »

  1.   

    不知道这样行不行,我猜想的...
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            DropDownList dll = (DropDownList)sender;
            Response.Redirect(dll.SelectedValue);
        }
      

  2.   

    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
      DataListItem item= (sender as DropDownList).NamingContainer as DataListItem;
      if(item!=null)//findcontrol查找控件
         {   
             DataRowView drv =item.DataItem as DataRowView ;
             if(drv !=null)
             {
                     string id=string.Format("{0}",drv["id"]);
              }
         }
    }
      

  3.   


    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
             DropDownList dll = e.Item.FindControl("DropDownList1");
            Response.Redirect(dll.SelectedValue);
        }试试,理论上可以