单击使用对话框的单个浏览按钮时显示图像 [英] show image on the click of single browse button using dialog box

查看:84
本文介绍了单击使用对话框的单个浏览按钮时显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<asp:Image ID="Image1" runat="server" Height="106px" />

    <asp:Button ID="Button1" runat="server" Text="Browse.." />

    <asp:Button ID="Button2" runat="server" Text="UPlOAD" />





我正在使用此页面.
现在我想要.....
1 ..当单击浏览按钮时,将打开打开对话框,并且选择了图像,我们选择它显示在图像框中...
2 ..当我单击上载按钮时,它会上载到我项目中的图像文件夹...
3 ..我不想在这里显示任何其他控件...........
请帮助我......
提前thnx ........................





i am using this page.
now i m want.....
1.. when click on browse button open dialog will come and whic image we select it show on image box...
2.. when i click on upload button it upload to the image folder in my project...
3.. i don''t want to show any other control here...........
plese help me...............
thnx in advance........................

推荐答案

您所描述的不能完毕.当用户选择图像时,您将根本无法显示该图像.为了显示图像,您需要先将其上传到您的网站.

也许您可以使用AJAX将图像上传到temp文件夹,然后如果用户决定保留它,则将其移动到其永久文件夹.

更新:有许多使用ajax/jQuery的方法.一个示例在此处 http://www.zurb.com/playground/ajax_upload [
What you describe can not be done. you simply won''t able to show the image when the user selects it. In order for the image to be displayed you need to upload it to your site first.

May be you can upload the image to temp folder using AJAX, then if the user decided to keep it move it to its permanent folder.

UPDATE: there are many ways to do it using ajax/jQuery. One example is here http://www.zurb.com/playground/ajax_upload[^]


这篇关于单击使用对话框的单个浏览按钮时显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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