DropDownList AppendDataBoundItems (first item to be blank and no duplicates)

后端 未结 6 743
醉梦人生
醉梦人生 2020-12-02 20:24

I have a DropDownList inside an UpdatePanel that is populated on postback from a SqlDataSource. It has a parameter which is another co

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-02 21:00

    You probably bind that DropDownList in the code behind. So you should not do it after postback again:

    // probably in Page_Load method
    if (!Page.IsPostBack)
    {
        // do data binding here
    };
    

提交回复
热议问题