Click here to Skip to main content
15,906,333 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<asp:Content ID="Content1" runat="server"
    contentplaceholderid="ContentPlaceHolder1">
    <div>
     <asp:Label ID="lb1" runat="server" Text="Label"></asp:Label>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
     ForeColor="Black" ShowHeader="False" BorderStyle="None"
            BorderColor="White" >
    <Columns>
   <asp:TemplateField>
    <ItemTemplate>
    <img alt ="" src ='Images/<%#Eval("Imagename") %>' height="50px" width="50px"style="border-radius:40px " />
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    </asp:GridView>
    </div>
</asp:Content>


but image is not show.
please help me
thanks
Posted
Comments
Check the source html and see what is the value of the image url. Confirm whether it is correct or not.

Display image from database in Image control without using Generic Handler in ASP.Net

Use Find Control concepts in row databound event

See below link

Display image from database in Image control without using Generic Handler in ASP.Net[^]
 
Share this answer
 
v2
This will work.

ASP.NET
<asp:templatefield>
                    <itemtemplate>
                        <asp:image runat="server" alt="" imageurl='Images/<%#Eval("Imagename") %>' height="50px" width="50px" style="border-radius: 40px" />
                    </itemtemplate>
                </asp:templatefield>
 
Share this answer
 
v3

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