[英]Failed to load resource: the server responded with a status of 404 (Not Found) in Asp.NET GridView
I am trying to load images from the folder UploadImages combined with image name for the particular query my gridview code is as follows: 我正在尝试从文件夹UploadImages加载图像,并结合特定查询的图像名称,我的gridview代码如下:
<asp:GridView ID="gvDetails" runat="server" AllowPaging="false" PageSize="50" ShowHeader="false" GridLines="None" AutoGenerateColumns="false" Width="100%" OnPageIndexChanging="gvDetails_PageIndexChanging">
<PagerSettings Mode="NumericFirstLast" PageButtonCount="4" FirstPageText="First" LastPageText="Last" />
<Columns>
<asp:TemplateField>
<ItemTemplate>
<h2><asp:Label runat="server"><%#Eval("Ads_Title")%></asp:Label></h2>
<h5><asp:Label runat="server" Text='<%#Eval("Ads_Posted_Date")%>'></asp:Label>, Posted by <asp:Label runat="server" Text='<%#Eval("Ads_State")%>'></asp:Label></a></h5>
<div class="blog-para">
<p class="para">
<image src='../UploadImages/<%#Eval("Busines_Image") %>' Width="150px" />
<p><asp:Label runat="server" Text='<%#Eval("Cat_Name")%>'></asp:Label></p>
<p>Pokect Listing: <asp:Label runat="server" Text='<%#Eval("PocketListing")%>' /> </p>
<p><asp:Label Text='<%# Eval("Ads_Hot_Normal") == "false" ? "<image src='images/premium_logo.png' alt='Premium'" : " " %>'runat="server" /></p>
<div class="read_more">
<a class="btn" href='AdsDetails.aspx?AddId=<%#Eval("main_ID") %>'>Read More</a>
</div>
</p>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Every time i run the webapp it states faied to load the resource. 每次我运行webapp时,都会提示无法加载资源。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.