string Wkid = Request.QueryString["id"];
        DateTime now = DateTime.Now;
        DateTime d1 = new DateTime(now.Year, now.Month, 1);
        int c = DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month);
        for (int i = 0; i < c; i++)
        {
            string j = d1.AddDays(i).toFormatShortDate();     ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.Page.GetType(), "   btn_check", "alert ('这个月还没安排的日期:" + j + "');", true);        }

解决方案 »

  1.   

    alert写在循环里了,应该写在循环后面。循环内动态生成字符串j,得到一长串的结果,再alert出这个结果。
      

  2.   

    yun ,那是两个加号,怎么和艹字这么像
      

  3.   

    循环alert要疯掉的 
     
     
     
    ----------------------------------签----------名----------栏----------------------------------
      

  4.   

     ScriptManager.RegisterStartupScript
    使用该方法可注册一个每次发生异步回发时都将包括的启动脚本块。所以就跳出了 ,你还是用js弹出吧 
      

  5.   


    ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.Page.GetType(), " btn_check", "alert ('这个月还没安排的日期:" + j + "');", true);=======================》Response.Write("<script>alert ('这个月还没安排的日期:" + j + "');</script>");
    这样就可以多次弹框提示了