Posts

Showing posts from July, 2016

Create Web Request in C# using asp.net

Name Space  using System.Collections.Specialized; using System.Net; using System.IO;  public string Post_Method(string uri, string command)     {         WebRequest req = null;         WebResponse rsp = null;         string tempReply = "";         try         {             req = WebRequest.Create(uri);             req.Method = "post";             req.ContentType = "application/x-www-form-urlencoded";             StreamWriter writer = new StreamWriter(req.GetRequestStream());             writer.Write(command);             writer.Close();             // Send the data to the webserver             rsp = req.GetR...