我想知道如何將圖像添加到基於XML文檔中的imageurl的網格視圖。到目前爲止,我已經......LINQ to XML和GridView.ImageField
XDocument xmlDoc = XDocument.Load(Server.MapPath("XMLFile.xml"));
var q = from c in xmlDoc.Descendants("Images")
where c.Element("PropertyId").Value.ToString() == DropDownList1.SelectedValue.ToString()
select new
{
Id = c.Element("PropertyId").Value,
Thumb = c.Element("ThumbUrl").Value
};
GridView1.DataSource = q;
GridView1.DataBind();
的正常工作,以顯示拇指領域的網址,但而不是顯示該如何更改它的像場?
顯示您的GridView標記 – abatishchev 2011-04-22 09:28:42