string url = http://90.0.0.88/xxx/Service.svc/Getlogin"; StringBuilder postData = new StringBuilder(); postData.Append("userName=" + HttpUtility.UrlEncode("xxx") + "&"); postData.Append("password=" + HttpUtility.UrlEncode("yyy")); //ETC for all Form Elements // Now to Send Data. StreamWriter writer = null; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; request.ContentLength = postData.ToString().Length; try { writer = new StreamWriter(request.GetRequestStream()); writer.Write(postData.ToString()); } finally { if (writer != null) writer.Close(); }
string inputStr = new StreamReader(input).ReadToEnd(); public void Getlogin (Stream input) { string inputStr = new StreamReader(input).ReadToEnd(); }
Request.Params["Index"];
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)