Using C#, I want to show the image in the Access column but failed to access.
for (int i = 0; i <= 5; i++)
{
if (myQuantity[i]!=null && myQuantity[i].Length>0)
{
row = dt.NewRow();
row["Name"] = myName[i];
row["Quantity"] = myQuantity[i];
row["Price"] = myPrice[i];
c = Convert.ToInt32(myQuantity[i]);
int price = Convert.ToInt32(myPrice[i]) * c;
row["Amount"] = price;
row["Action"]= " <img src='Images/cross.png' />";
dt.Rows.Add(row);
}
}
GridView1.DataSource = dt;
GridView1.DataBind();
}
Hello Fahad you can try with this code
with Byte storage
Or with path, you can add control in your GridView and add bind your control with the path on image.
asp:ImageButton id=”ImageButton” runat=”server” ImageUrl=”<%# Container.DataItem(“pictues”) %>/>