我创建了一个数据表,我想在该Datatable中添加Image Tag。我的代码如下: -
DataTable DTflight = new DataTable();
DataRow dr;
DTflight.Columns.Add("AirLineName");
for (int i = 0; i < distinctFlights.Count-1; i++)
{
dr = DTflight.NewRow();
dr["AirLineName"] =distinctFlights[i].AirlinesImage;
DTflight.Rows.Add(dr);
}
我想在我的DataTable中添加图片标签。如果可能的话,如下所示
dr["AirLineName"] ='<img src='+distinctFlights[i].AirlinesImage;
由于
答案 0 :(得分:0)
得到了解决方案
dr["AirLineName"] ="<img src=\"" + distinctFlights[i].AirlinesImage + "\" />";