learner_7983
October 21st, 2004, 08:17 PM
I have a column Image in the table, data type varchar which hold the path to the actual image in my computer eg :- C:\Images\book.jpg.
When I try to display the result in the datagrid in web application it displays the path to me as C:\Images\book.jpg.
What I actually want is the actual picture instead of the full path.
I tried this code too:-
string img ="";
foreach(DataRow row in imageDataSet1.Tables["ImageTable"].Rows)
{
img =row[0].ToString();
//labISBN.Text = row[1].ToString();
//labTitle.Text = row[2].ToString();
}
If I say Image1.ImageUrl = img;
I can get the image but not in the data grid
If I say DataGrid1.DataBind();//other code omitted
It displays the full path not the actual image in that column
I couldn’t find options in the property builder of the datagrid
I’m using C# as the programming language.
Thanks in advance
When I try to display the result in the datagrid in web application it displays the path to me as C:\Images\book.jpg.
What I actually want is the actual picture instead of the full path.
I tried this code too:-
string img ="";
foreach(DataRow row in imageDataSet1.Tables["ImageTable"].Rows)
{
img =row[0].ToString();
//labISBN.Text = row[1].ToString();
//labTitle.Text = row[2].ToString();
}
If I say Image1.ImageUrl = img;
I can get the image but not in the data grid
If I say DataGrid1.DataBind();//other code omitted
It displays the full path not the actual image in that column
I couldn’t find options in the property builder of the datagrid
I’m using C# as the programming language.
Thanks in advance