protected void Button1_Click(object sender, System.EventArgs e)
{
string str1 = TextBox1.Text;
string str2 = TextBox2.Text;
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
string postdata = null;
postdata = "str1=" + str1;
postdata += ("&str2=" + str2);
byte[] data = null;
Data = encoding.GetBytes(postdata);
System.Net.HttpWebRequest myRequest = default(System.Net.HttpWebRequest);
myRequest = (System.Net.HttpWebRequest)System.Net.WebRequest.Create("http://localhost/6.1/Default.aspx");
myRequest.Method = "POST";
myRequest.ContentType = "application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
System.IO.Stream myStream = default(System.IO.Stream);
myStream = myRequest.GetRequestStream();
myStream.Write(data, 0, data.Length);
myStream.Close();
}