这是App_Data文件夹中的图像浏览器没有显示 [英] Images that are in App_Data folder not shown in browser

查看:214
本文介绍了这是App_Data文件夹中的图像浏览器没有显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我设置的图像URL属性为ASP图像控制是在App_Data文件夹中,图像显示在页面设计视图而不是在浏览器中。

When I set image URL property to asp image control that is in App_Data folder, image is showing in page design view but not in browser.

<form id="form1" runat="server">
<div>
    <asp:Image ID="Image1" runat="server" ImageUrl="~/App_Data/p3.jpg" />
</div>
</form>

这似乎在寻找向前伸直,但不显示图像。

It seems to be looking straight forward, but not showing image.

感谢

推荐答案

的App_Data 文件夹是如数据库文件数据保留一个特殊的文件夹等,并会的的呈现出在网络上的任何内容。这是由设计,并有意和不能改变(据我所知)。

The App_Data folder is a special folder reserved for data such as database files and so on, and will NOT render out any contents on the web. This is by design, and intentional and cannot be changed (as far as I know).

您的图像也绝对不属于到的App_Data 子目录 - 把它们放在一个 /图片文件夹或更多的东西合适的。

Your images do definitely not belong into the App_Data subfolder - put them into a /images folder or something more appropriate.

这篇关于这是App_Data文件夹中的图像浏览器没有显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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