Khilen
Khilen

Reputation: 1089

how to get image whose path is stored in database in Gridview of asp.net

Hi i have stored the images in mysql using the varchar datatype and i am storing the path of that and i want to retrive that images in the gridview of asp.net

Upvotes: 0

Views: 1338

Answers (1)

Steven
Steven

Reputation: 172666

You can use an ImageField, like this:

<asp:GridView ID="GridView1" Runat="server" 
  DataSource='<%# GetData() %>' AutoGenerateColumns="False">
    <Columns>
        <asp:ImageField DataImageUrlField="PictureURL"></asp:ImageField>
    </Columns>
</asp:GridView>

Upvotes: 2

Related Questions