简体   繁体   English

无法加载资源:服务器在Asp.NET GridView中以404(未找到)状态响应

[英]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&nbsp;<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时,都会提示无法加载资源。

This is might be happening because GridView control is losing View. 这可能是由于GridView控件丢失了View而发生的。 For more details yo can try this Link 有关更多详细信息,您可以尝试此链接

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ASP.NET CORE 2.2 新项目,无法加载资源:服务器在 JS/CSS/Image 的服务器中响应状态为 404(未找到)错误 - ASP.NET CORE 2.2 New Project, Failed to load resource: the server responded with a status of 404 (Not Found) error in server for JS/CSS/Image net core 2无法加载资源:服务器响应状态为404(未找到) - net core 2 Failed to load resource: the server responded with a status of 404 (Not Found) ASP无法加载资源:服务器在服务器中响应状态为404(未找到)错误 - ASP Failed to load resource: the server responded with a status of 404 (Not Found) error in server 加载资源失败:服务器响应状态为 404() - Failed to load resource: the server responded with a status of 404 () 加载资源失败:服务器响应状态为500(内部服务器错误)asp.net - Failed to load resource: the server responded with a status of 500 (Internal Server Error) asp.net 加载资源失败:服务器在 asp.net 内核中使用谷歌图表时响应状态为 500 () - Failed to load resource: the server responded with a status of 500 () while using google charts in asp.net core 加载资源失败:服务器响应状态为 500 () asp.net mvc - Failed to load resource: the server responded with a status of 500 () asp.net mvc 加载资源失败:服务器响应状态为 500 () | Oracle &amp; ASP.NET 核心 MVC 3.1 - Failed to load resource: the server responded with a status of 500 () | Oracle & ASP.NET Core MVC 3.1 ASP.NET和jQuery无法加载资源:服务器响应状态为405(不允许使用方法) - ASP.NET and jQuery Failed to load resource: the server responded with a status of 405 (Method Not Allowed) 从 angular 调用 .net 核心方法给出错误:加载资源失败:服务器响应状态为 404 () - calling .net core method from angular gives error: failed to load resource: the server responded with a status of 404 ()
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM