Horje
C# webclient submit form Code Example
C# webclient submit form
var strId = UserId_TextBox.Text;
var strName = Name_TextBox.Text;

var encoding=new ASCIIEncoding();
var postData="userid="+strId;
postData += ("&username="+strName);
byte[]  data = encoding.GetBytes(postData);

var myRequest =
  (HttpWebRequest)WebRequest.Create("http://localhost/MyIdentity/Default.aspx");
myRequest.Method = "POST";
myRequest.ContentType="application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
var newStream=myRequest.GetRequestStream();
newStream.Write(data,0,data.Length);
newStream.Close();

var response = myRequest.GetResponse();
var responseStream = response.GetResponseStream();
var responseReader = new StreamReader(responseStream);
var result = responseReader.ReadToEnd();

responseReader.Close();
response.Close();




Csharp

Related
how to set discord status Csharp bot Code Example how to set discord status Csharp bot Code Example
c# array inst working Code Example c# array inst working Code Example
Select records that does not exist in another table in Entity Framework Code Example Select records that does not exist in another table in Entity Framework Code Example
Load Level Action for unity Code Example Load Level Action for unity Code Example
unity colllion not working Code Example unity colllion not working Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9