执行Respone.Write提示框后页面变化了
if (code == Extractcode)
{
if (currenttime < effectivedate)
{
downfile();
}
else
{
Response.Write("<script Language='JavaScript'>alert('有效期已过,请联系分享人员')</script>");
}
}
else
{
Response.Write("<script Language='JavaScript'>alert('提取码错误,请联系分享人员')</script>");
}
原本页面是:

执行Response后,页面变这样的
------解决方案-------------------- write会把页面样式弄没了。
用下面就好了
ClientScript.RegisterStartupScript(this.Page.GetType(), "", "<script>alert('有效期已过,请联系分享人员');</script>");