.NET Framework Developer's Guide 
ASP.NET Web Applications (.NET 3.0) 

ASP.NET is a unified Web platform that provides all the services necessary for you to build enterprise-class applications. ASP.NET is built on the .NET Framework, so all .NET Framework features are available to ASP.NET applications. Your applications can be written in any language compatible with the common language runtime, including Visual Basic, C#, and JScript. The topics in this section provide details about how to use the features offered by ASP.NET.

In This Section

Related Sections



Community Content

tottosimon
Transform XML From A Remote Server

Using a <asp:Xml control:

<asp:Xml id="Xml1" runat="server" TransformSource="Weather.xsl"></asp:Xml>

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 Try
  Dim HttpSite As Uri = New Uri("http://www.weather.gov/data/current_obs/KIPT.xml")
  Dim wreq As HttpWebRequest = CType(WebRequest.Create(HttpSite), HttpWebRequest)
  wreq.KeepAlive = False
  wreq.Timeout = 30000
  'Get the data as an HttpWebResponse object
  Dim resp As HttpWebResponse = wreq.GetResponse()
  Dim strReader As StreamReader = New StreamReader(resp.GetResponseStream(), System.Text.Encoding.UTF8)
  Dim tr As New XmlTextReader(strReader)
  Dim doc As New XmlDocument
  doc.Load(tr)
  Xml1.Document = doc
  resp.Close()
  wreq.Abort()
 Catch ex As Exception
  Xml1.DocumentSource = "Weather.xml"
 End Try
End Sub
Tags :

tottosimon
See Also info

http://codeplex.com

Tags :

Page view tracker