DropDownList1 :AutoPostBack=true CommandName="bind"
ItemCommand:
if (e.CommandName=="bind")
{
    //bind DropDownList2
}

解决方案 »

  1.   

    在onchange中怎么去获取另一个dropdownlist 中的值,不过有两位的方法,我想我能试出来谢谢了!
    又问,做新闻显示,用什么控件 datalist,datagrid,或者别的,
    在存储过程中怎么返回一个数据集(我想在存储过程中返回前20条新闻)
      

  2.   

    <asp:DropDownList ID="ddl" OnSelectedIndexChanged="Index_Changed" ...........
        void Index_Changed(Object sender, EventArgs e) {
            //Bind ddl2
        }
      

  3.   

    to  acewang(**^o^**) 难道你的方法不行吗?
    能告诉我其它的方法吗?
      

  4.   

    to  acewang(**^o^**) 用你的方法怎么去获取第一个dropdownlist 的值?
      

  5.   

    在SELECTITEMCHANGE事件里写要操作的代码,注意它的AUTOPOSEBACK属性要为TRUE
      

  6.   

    DropDownList1 :AutoPostBack=true 
    private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
    {
       string val=DropDownList1.SelectedItem.Value;   //item值
       string txt=DropDownList1.SelectedItem.Text;    //item文本
    }
    -----------------------------------------------------------------------
    cmd=new SqlCommand("存储过程名",con);
    cmd.CommandType=CommandType.StoredProcedure;
    SqlDataReader dr=cmd.ExecuteReader();
    dr就是返回的数据集了。
      

  7.   

    楼上的大哥可能会错我的意思了!
    1.dropdownlist在datagrid中
    2."存储过程名"在这个存储过程中返回一个数据集!也就是利用这个存储过程中的语句,返回一个数据集!
    不过在这里还得先谢谢大家!