Y
Yogesh
Hi all
I want to do Http POST from C# application i m using webclient for that .
Mi prob is when i am posting data i need to fire Button1_Click event which
is not firing .
Like this is client Code
WebClient myWebClient = new WebClient() ;
req.ContentType = "application/x-www-form-urlencoded";
req.Method = "POST";
NameValueCollection Coll = new NameValueCollection() ;
Coll.Add("TextBox1" ,"ram") ;
Coll.Add("TextBox2" ,"Shyam") ;
Coll.Add("Button1" ,"Button") ;
byte[] responseArray =
myWebClient.UploadValues("http://192.168.96.33/TestPost/WebForm1.aspx","POST
",Coll);
MessageBox.Show(System.Text.Encoding.ASCII.GetString(responseArray));
On server ther e is event
private void Button1_Click(object sender, System.EventArgs e)
{
TextBox1.Text = "Yogesh" ;
Response.Write(TextBox1.Text + TextBox2.Text) ;
}
I need to call this event
Thanks in advance
Yogesh
I want to do Http POST from C# application i m using webclient for that .
Mi prob is when i am posting data i need to fire Button1_Click event which
is not firing .
Like this is client Code
WebClient myWebClient = new WebClient() ;
req.ContentType = "application/x-www-form-urlencoded";
req.Method = "POST";
NameValueCollection Coll = new NameValueCollection() ;
Coll.Add("TextBox1" ,"ram") ;
Coll.Add("TextBox2" ,"Shyam") ;
Coll.Add("Button1" ,"Button") ;
byte[] responseArray =
myWebClient.UploadValues("http://192.168.96.33/TestPost/WebForm1.aspx","POST
",Coll);
MessageBox.Show(System.Text.Encoding.ASCII.GetString(responseArray));
On server ther e is event
private void Button1_Click(object sender, System.EventArgs e)
{
TextBox1.Text = "Yogesh" ;
Response.Write(TextBox1.Text + TextBox2.Text) ;
}
I need to call this event
Thanks in advance
Yogesh