.net 后台判断是否要替换

Response.Write("<script>window.onload=function (){if(confirm(\"该文件已经存在,确定要替换吗吗?\")){document.getElementById(\"hidIsSave\").value = \"1\" }else {document.getElementById(\"hidIsSave\").value = \"0\"}}</script>");
if (hidIsSave.Value == "1")
{
File.Delete(Server.MapPath(FileName));
fuload.SaveAs(Server.MapPath(FileName));
}
else
{

}

猜你喜欢

转载自www.cnblogs.com/balcon/p/10240832.html
net
今日推荐