| asp.net无刷新上传文件 |
| 来源:
发布时间:2008-06-30 发布人:
浏览:
人次
字体:
[大
中
小]
|
|
下面则是要让我们能够看到我们传上去的文件,如果不能实时看到,这个Ajax 文件上传就没啥意义了。 File.aspx页面的功能代码如下: protected void Page_Load(object sender, EventArgs e) { Guid key = new Guid(Request.QueryString["key"]); //图片所在路径 string fileName = Server.MapPath(String.Format("~/Files/{0}.jpg", key)); // Send the file Response.ContentType = "image/jpeg"; Response.WriteFile(fileName, true); Response.AddFileDependency(fileName); Response.Cache.SetCacheability(HttpCacheability.Public); Response.Cache.SetAllowResponseInBrowserHistory(true); }OK!一切都完成了。
共3页: 上一页 [1] [2] 3 下一页
| |
| |
|
|
|
|
| §最新评论:(评论内容只代表网友观点,与本站立场无关!) | |
|
|
|
|
| 注意:请勿在本站发布政治话题、色情及违反法律的内容。 |
IT知道网 声明:刊登此文章是为了传递更多信息,文章内容仅供参考,转载请注明出处。 |