"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Friday, August 13, 2010

Binding grid with an xml File from other website

 HI frienz,
In my last post i shown how to bind grid from a local pc.In this post i'm Binding grid with xml from Other website.

        WebRequest wreq = WebRequest.Create("http://your webservice provider/pagename.aspx?qstring="+args);
        WebProxy proxy = new WebProxy("http://your webservice provider/pagename.aspx?qstring="+args, true);
        wreq.Proxy = proxy;
        wreq.Timeout = 5000;
        WebResponse wres = wreq.GetResponse();
        XmlTextReader xmlRead = new XmlTextReader(wres.GetResponseStream());
        DataSet ds = new DataSet();
        ds.ReadXml(xmlRead);


Hope it will help u.

Have a nice day... 'N happy Coding :)

No comments: