web 2.0

ASP.NET(vb.net) & XML RSS Feed

ASP.NET(vb.net) & XML RSS Feed - The in this article we will show example scripts ASP.NET how to read XML RSS  Feed.

ShotDev Focus:
- ASP.NET(vb.net) & XML RSS Feed

Example

AspNetXMLFeed.aspx

<%@ Import Namespace="System.Data"%>
<%@ Import Namespace="System.XML"%>
<%@ Page Language="VB" %>
<script runat="server">

Sub Page_Load(sender As Object, e As EventArgs)

Dim strURL As String
Dim ds As New DataSet()

strURL = Server.MapPath("XML/news.xml")
'strURL = "http://www.shotdev.com/news.xml"  '*** Feed From Other Website ***'
Dim reader as XmlTextReader = New XmlTextReader(strURL)
ds.ReadXml(reader)

'*** BindData to Repeater ***'
myRepeater.DataSource = ds
myRepeater.DataBind()

ds = Nothing
End Sub

</script>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Repeater id="myRepeater" runat="server">
<ItemTemplate>
<a href="<%#Container.DataItem("Link") %>" target="blank"><%#Container.DataItem("Subject") %></a><br />
</ItemTemplate>
</asp:Repeater>
</form>
</body>
</html>

Screenshot

ASP.NET(vb.net) & XML RSS Feed
.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.