My Table looks like
Table Name: Categories
CategoryID : int
CategoryName: text
Description: text
Picture: Image

Now I want to display all these fields in a DataGrid.

I have done this,

DataGrid1.DataSource = DataTable or DataView;
<asp:DataGrid ID="DataGrid1" runat="server" AutoGenerateColumns="False" 
        <asp:BoundColumn DataField="CategoryID" HeaderText="Category ID" />
        <asp:BoundColumn DataField="CategoryName" HeaderText="Category Name" />
        <asp:BoundColumn DataField="Description" HeaderText="Description" />
        <asp:TemplateColumn HeaderText = "Picture">
                <asp:Image ID="Image1" runat="server" />

I'm facing problem in binding the image. All other columns are fine.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.