联系我们

为客户提供超预期的高品质网站设计!

Repeater 中button 获得的DropdrownList的值

2017-11-20 0:00:00

protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {


        if (e.CommandName == "addCart")
        {

         string ID = e.CommandArgument.ToString();

           DropDownList dd = ((Control)e.CommandSource).BindingContainer.FindControl("Ddl_city") as DropDownList;

          string cityID=dd.SelectedValue

}

}

上一条新闻:asp.net 随机码
下一条新闻:于Repeater中的Button按钮中的CommandArgument传参 当有多个参数

 

4009-606-208 54057491 info@