摘要: //判断上传的文件是否为空HttpPostedFilepostFile=Request.Files["upfile"];if(postFile==null||postFile.ContentLength<0){ //提示为空或者其他操作}//如果是文本文件,读取其内容Streams=StreamCopyTo(postFile.InputStream);StreamReadersr=newStreamReader(s,System.Text.Encoding.Default);strCode =sr.ReadToEnd(); //strCode就是文本文件中的内容s.C 阅读全文
posted @ 2012-04-12 15:27 ゞ追忆o0ゞ 阅读(1324) 评论(0) 推荐(0) 编辑