我从文件夹中提取图像时没有显示图像。

我从文件夹中提取图像时没有显示图像。

问题描述:

您好



这是我的链接



http://pehravnifashion.com/Best-Sherwani.aspx [ ^ ] [ ]



我的代码是



Hello

This is My link

http://pehravnifashion.com/Best-Sherwani.aspx[^] []

My code is

<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1"
         RepeatDirection="Horizontal"  RepeatColumns="3" >
         <ItemTemplate>
     <div class="prd-block1">
  <div class="image"> <span class="offer-tag"></span>
       <asp:ImageButton ID="ImageButton1" runat="server"  ImageUrl='<%# Eval("ImagePath","admin/FESTIVALWEAR\\") %>' PostBackUrl='<%# Eval("id","ProductDetails.aspx?id={0}") %>' /><br />
    </div>
       <div class="infowrp">
         <div class="info">

         class="nameText">
           <asp:Label ID="NameLabel"  runat="server" Text='<%# Eval("ImageName") %>' Font-Size="XX-Large" ForeColor="Red" />

            <br />
         <asp:Label ID="PriceLabel" runat="server" ForeColor="Red" Font-Size="Large" Text='<%# Eval("details") %>'></asp:Label><br />
         
         </div>
       </div>
     </div>
     </ItemTemplate>
     </asp:DataList>

试试这个



Try this

<asp:imagebutton id="ImageButton1" runat="server" imageurl="<%# Eval("ImagePath","<u>admin/FESTIVALWEAR/{0}</u>") %>" postbackurl="<%# Eval("id","ProductDetails.aspx?id={0}") %>" xmlns:asp="#unknown" /><br />




最有可能是数据绑定时链接到图像的网址不正确。将鼠标指向超链接,右键单击并转到属性并将网址复制到那里,尝试在stadalone窗口中打开该URL,可能你会想到调试。看看你是否能够导航到该图像文件夹。还要确保图像实际可用于超链接边界所指向的位置到它。还要确保放置图像的文件夹具有enoug h允许访问它。



如果有帮助请告诉我。
Hi,
Most probably the url that are linked to images upon data binding is not proper.Point your mouse at the hyperlink,right click and go to properties and copy the url there,try to open that url in a stadalone window ,probably you will get an idea to debug.See if you are able to navigate to that images folder.Also make sure the image is actually available at the location that is pointed by the hyperlink bound to it.Also make sure the folder in which the images are placed have enough permission to access it.

Let me know if it helps.


你好



我已更改我的代码



Hello

I have changed my code

<asp:imagebutton id="ImageButton1" runat="server" imageurl="<%# Eval("ImagePath","/admin/{0}") %>" height="300px" width="300px" postbackurl="<%# Eval("id","ProductDetails.aspx?id={0}") %>" xmlns:asp="#unknown" /><br />