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); }
LZ是想让它多次跳出,但是你写的代码根本就不会多次跳出吧ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.Page.GetType(), " btn_check", "alert ('这个月还没安排的日期:" + j + "');", true);=======================》Response.Write("<script>alert ('这个月还没安排的日期:" + j + "');</script>");
这样就可以多次弹框提示了
StringBuilder sb = new StringBuilder();
for (int i = 0; i < c; i++)
{
string j = d1.AddDays(i).toFormatShortDate(); sb.Append("alert ('这个月还没安排的日期:" + j + "');");
}
ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.Page.GetType(), " btn_check", sb.ToString(), true);