开发者

Insert XML into a specific div with C#

I am getting XML data from feedburner and in my C# codebehind I am accessing the data like so:

XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=cooklikecarolyn");
XmlNodeList subscribers = xmlDoc.GetElementsByTagName("entry");
Response.Write(subscribers[0].Attributes["circulation"].Value.ToString());

How do I insert this into a div I already have at the bottom of the page开发者_开发技巧?


Set the div runat="server':

<div id="feedDiv" runat="server"></div>

Then set the InnerHtml or InnerText of the div in C#:

feedDiv.InnerHtml = subscribers[0].Attributes["circulation"].Value.ToString();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜