在DropDownList中,有若干项,在服务器端代码SelectedIndexChanged事件处理函数设置断点,选择其它项均响应,在断点处中断,但选择第一项时,总是断不下来!请各位高人指点一二!

解决方案 »

  1.   

    UP楼上的,
    还有就是绑定语句要写在,如下:
    if(!Page.IsPostBack)
    {
                                         ............
                                DropDownList1.DataSource=ds.Tables[0];
    DropDownList1.DataTextField="name";
    DropDownList1.DataBind(); }
      

  2.   

    >>>但选择第一项时,总是断不下来when are you having problems selecting the 第一项? first time or later?suggest you add an empty listitemif (!IsPostBack)
    {
      DropDownList1.DataSource = ...
      DropDownList1.DataBind();  DropDownList1.Items.Add(new ListItem("---Please Select---", ""));
    }
      

  3.   

    这是微软的一个BUG,早在.net bata版的时候就已经存在,到现在的正式版都没有解决!我曾经也遇到过!这是没办法的!
      

  4.   

    虽然没有到达预期的效果,但参照saucer(思归)的建议,也算是解决了这个问题,多谢各位了!!
      

  5.   

    nod
    绑定一定要写到
    if(!IsPostBack)
    {}