如何通过asp查找所选图像的名称 [英] How to find name of selected Image through in asp

查看:81
本文介绍了如何通过asp查找所选图像的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过< input type ="file" .../>
上传图片 并仅将图像名称保存在数据库中,并将图像保存在目录中我项目的文件目录中.


请给我解决方法.



I want to upload image through <input type="file".../>
and save only image name in database and save image in Directory in my file dirctory of my project.


please give me solution.



Thank''s in advance.

推荐答案

您使用的是经典" ASP还是ASP.NET?如果您使用的是ASP.NET,那么我想使用asp:FileUpload控件,该控件在HTML中呈现为<input type="file".在后台,此控件提供了FileName 属性,可用于标识文件名.

如果您使用的是经典" ASP,那么在此处 [
Are you using "classic" ASP or ASP.NET? If you are using ASP.NET, then I would look to use the asp:FileUpload control which renders out to an <input type="file" in your HTML. Behind the scenes, this control provides a FileName property which can be used to identify the filename.

If you are using "classic" ASP, there''s a good example here[^] of how to do this.


这篇关于如何通过asp查找所选图像的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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