Monday, January 3, 2011

Run URL from desktop application

You can run/call URL and get response from desktop application

  private static string GetPageContent(string FullUri)
        {
            HttpWebRequest Request = default(HttpWebRequest);
            StreamReader ResponseReader = default(StreamReader);

            Request = (HttpWebRequest)WebRequest.Create(FullUri);
           
            ResponseReader = new StreamReader(Request.GetResponse().GetResponseStream());

            return ResponseReader.ReadToEnd();
        }

solution by: Rajesh Rolen

Share This!


No comments:

Powered By Blogger · Designed By Seo Blogger Templates