L
Lars Pedersen
Hi.
I'm having a datagrid which i build dynamically in codebehind, adding each
column to the grid.
One of the Boundcolumns contains an Image, and that's ok. I just want the
formatstring to act as a link, pointing to another page and should contain
the ID from a datasource, like this:
col = new BoundColumn();
col.HeaderText = "Image";
col.DataField = "ImageURL";
col.DataFormatString = "<a href='productinfo.aspx?id='//ID HERE//'><Img
src='{0}' border='0' width='80' height='60'></a>";
dgProductList.Columns.Add(col);
How do i put the ID in the code from a dataset. Excactly as the DataField, i
just need one more.
A appreciate any help.
-Lars
I'm having a datagrid which i build dynamically in codebehind, adding each
column to the grid.
One of the Boundcolumns contains an Image, and that's ok. I just want the
formatstring to act as a link, pointing to another page and should contain
the ID from a datasource, like this:
col = new BoundColumn();
col.HeaderText = "Image";
col.DataField = "ImageURL";
col.DataFormatString = "<a href='productinfo.aspx?id='//ID HERE//'><Img
src='{0}' border='0' width='80' height='60'></a>";
dgProductList.Columns.Add(col);
How do i put the ID in the code from a dataset. Excactly as the DataField, i
just need one more.
A appreciate any help.
-Lars