PostedFile

来源:互联网 发布:python rpc框架 编辑:程序博客网 时间:2024/06/05 07:13

protected void btnGoup_Click(object sender , EvetArgs e) 
{

  string str=this.File1.PostedFile.FileName;
 if(str=="")
{
  Response.write(bc.Messagebox("need picture"));
 return;
}
string ss=str.Substring(str.LastIndexOf("//")+1);
string s=Server.Mappath("..//photo//"+ss);
path="..//photo//"+ss;
if(File.Exists(s))
{
   Response.write(bc.MessageBox("file Existed"); return;
}
this.File1.PostedFile.SaveAs(s);

image.imageurl=s;
}

原创粉丝点击