http://twitter.com/statuses/user_timeline.xml?screen_name=username&count=n
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="twitterclient.aspx.cs" Inherits="twitterclient" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <h2>Twitter Tweets</h2> <asp:DataList ID="DataList1" runat="server" DataSourceID="XmlDataSource1"> <ItemTemplate> <b><%# XPath("text") %></b> <br /> <%# XPath("created_at") %> </ItemTemplate> <SeparatorTemplate> <hr /> </SeparatorTemplate> </asp:DataList> <asp:XmlDataSource ID="XmlDataSource1" runat="server"></asp:XmlDataSource> </form> </body> </html>
using System; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Net; using System.Xml; public partial class twitterclient : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { WebClient wc = new WebClient(); // get recent 5 updates string resp = wc.DownloadString("http://twitter.com/statuses/user_timeline.xml?screen_name=srikanthpragada&ount=5"); XmlDataSource1.Data = resp; } }