How to work with Datagrid on the WEB and the column should be defined as an image.
The image will be brought from the database (.DAT).
I use Microfocus Cobol with Visual Cobol and use native database.
I tried ... but something is wrong
In .ASP, I wrote this code
<asp:TemplateField HeaderText="Foto">
<ItemTemplate>
<asp:Image ID="img" runat="server"
ImageUrl=<%#Eval("wfoto") %> Width="100px" Height="100px" />
</ItemTemplate>
</asp:TemplateField>
In .asp.cbl (COBOL), this one
declare Dt as type System.Data.DataTable
invoke Dt::Columns::Add("wfoto",type System.Type::GetType::ToString())
move "http://localhost:49955/Images/A30E.jpg" to wfoto
move 1 to wind
perform until wind > 10
invoke Dt::Rows::Add(wfoto)
add 1 to wind
end-perform
set GridView1::DataSource to Dt
invoke GridView1::DataBind()
Someone can help me, please?