欢迎来到天天文库
浏览记录
ID:17498717
大小:22.40 KB
页数:5页
时间:2018-09-02
《aspxuploadcontrol文件上传技术文档》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingDevExpress.Web.ASPxUploadControl;usingSystem.IO;usingMicrosoft.Office.Interop.Word;usingMS.Internal.Xml;usingWord=Microsoft.Office.Interop.Word;publicpartialclassContr
2、ibutor_Author_Upload:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){}//protectedvoidbtnUpload_Click(objectsender,EventArgse)//{//stringid=Session["稿?件tID"].ToString();//Session["稿?件tID"].ToString();//stringzzlb=Request.QueryString["zzlb"];//stringny=Request.QueryString["ny"];//s
3、tringbc=Request.QueryString["bc"];//stringgjbt=Request.QueryString["gjbt"];//decimalfilesize=FileUpload_upload.PostedFile.ContentLength/1024;//stringfiletype=FileUpload_upload.PostedFile.ContentType;//if(this.FileUpload_upload.PostedFile.FileName=="")//{//ClientScript.RegisterStartupScript(this.Get
4、Type(),"alert",String.Format("","请?选?择?文?件t!"));//return;//}//if(this.FileUpload_upload.FileName.Substring(this.FileUpload_upload.FileName.Length-4,4).ToLower()!=".doc")//{//ClientScript.RegisterStartupScript(this.GetType(),"alert",String.Format("","文?件t不?能¨¹超?过y2M"));//return;//}//try//{//stringClientPath=FileUpload_upload.PostedFile.FileName;//客¨ª户¡ì端?文?件t路¡¤径
6、?//FileInfoClientPathFile=newFileInfo(ClientPath);//stringServerPath="C:\"+zzlb+"\"+ny+"\"+bc;//Server.MapPath("../Document/稿?件tword/"+id+"_"+ClientPathFile.Name);//服¤t务?端?文?件t路¡¤径?//stringFileName=FileUpload_upload.FileName;////判D断?是º?否¤?存ä?在¨²文?件t夹D,ê?不?存ä?在¨²则¨°创ä¡ä建¡§//DirectoryInfofile=newD
7、irectoryInfo(ServerPath);//if(!file.Exists)//{//file.Create();//}//ServerPath=ServerPath+"\"+id+"_"+gjbt+".doc";////if(System.IO.File.Exists(ServerPath))//判D断?服¤t务?器¡Â上¦?是º?否¤?有®D同ª?名?文?件t存ä?在¨²,ê?若¨?自Á?己o
此文档下载收益归作者所有