如何在保存上传文件之前预览图像 [英] how to get preview of image before save in upload filder

查看:86
本文介绍了如何在保存上传文件之前预览图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用文件上传控件

提交单击我的图像已保存在上传文件夹中

但我无法在控制图像上找到图像预览1

请帮我预告图片





i'm using file upload control
on submit click my image having been save in uploads folder
but i'm unable to find the image preview on control image 1
please help me in diplaying preview


Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        txtEmployeeid.Focus()
        If IsPostBack = True Then
<pre lang="vb">Dim ext As String = Path.GetExtension(FileUpload1.FileName)
           Dim newfile As String = txtEmployeeid.Text + ext
           If FileUpload1.HasFile Then
               Dim theFileName As String = Path.Combine(Server.MapPath(&quot;~/Uploads&quot;), newfile)
               If File.Exists(theFileName) Then
                   File.Delete(theFileName)
               End If
               FileUpload1.SaveAs(theFileName)
           End If</pre>

推荐答案

查看此...

http://www.aspdotnet-suresh.com/2014/03/jquery-preview-image-before-upload-using-fileupload.html [ ^ ]
view this...
http://www.aspdotnet-suresh.com/2014/03/jquery-preview-image-before-upload-using-fileupload.html[^]


嗨...

使用Ajax查看此内容..

http://www.html5rocks.com/en/tutorials/file/dndfiles/#toc-reading-files [ ^ ]

http://www.jquery4u.com/ajax/image-upload- example / [ ^ ]

谢谢你。
Hi...
See this one using Ajax..
http://www.html5rocks.com/en/tutorials/file/dndfiles/#toc-reading-files[^]
http://www.jquery4u.com/ajax/image-upload-example/[^]
Thank u.


这篇关于如何在保存上传文件之前预览图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆