Posted By

LeeRJohnson on 11/28/07


xslt xml XSL aspnet transform WebControl

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


ASP XML Web Control Content By URL

 / Published in: C#

This is an old quick and dirty way to read and transform feeds and HTML content. The good part is if update your code the XML/HTML and the XSLT will be the same.

  1. //script
  2. XmlDocument xdocUrl = new XmlDocument();
  3. //Read URL into new XmlDocument
  4. xdocUrl.Load("");
  5. xmlCtrl.DocumentContent = xdocUrl.InnerXml;
  6. //Load XSLT for formating
  7. xmlCtrl.TransformSource = "~/template.xslt";
  9. //page tag
  10. <asp:Xml ID="xmlCtrl" runat="server"></asp:Xml>

Report this snippet  

You need to login to post a comment.