Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello

This is My link

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

My code is

C#
<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>
Posted
Comments
ZurdoDev 31-Jan-14 11:24am    
What image? And just view source on it so you can see the url. Should be easy to fix.
Pankil_Plus 31-Jan-14 11:57am    
Sir, I did all the things. Can you please tell me the path?

Try this

ASP.NET
<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 />
 
Share this answer
 
Comments
Pankil_Plus 1-Feb-14 1:07am    
thank you sir. I am fetching /FESTIVALWEAR path from database. so /admin/{0} done the trick
Karthik_Mahalingam 1-Feb-14 11:28am    
if this helps,pls mark it as answer.
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.
 
Share this answer
 
v2
Comments
Pankil_Plus 31-Jan-14 15:20pm    
thax for your reply. permission play important role
Hello

I have changed my code

C#
<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 />
 
Share this answer
 
Comments
SoMad 31-Jan-14 19:25pm    
Did this solve your problem?

Soren Madsen
Pankil_Plus 1-Feb-14 1:05am    
Yes sir.
Pankil_Plus 1-Feb-14 1:07am    
Yes sir... {0} should be there.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900