Click here to Skip to main content
15,900,378 members

Comments by ahmadnawaz (Top 1 by date)

ahmadnawaz 14-Apr-11 3:32am View    
but i am getting the image from a directory not from database.
How could i do this.
I tried the follwoing.



DataTable dt = new DataTable();
DataColumn col;
DataRow row;

col = new DataColumn();
col.ColumnName = "PictureURL";
dt.Columns.Add(col);


row = dt.NewRow();
System.Drawing.Image MyImage = System.Drawing.Image.FromFile("C:\\tickmark.png");
row["PictureURL"] = MyImage;


GridView1.DataSource = dt;
GridView1.DataBind();


but it output the following
System.Drawing.Bitmap