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 = "applicatio n/x-www-form-urlencoded";
req.Method = "POST";
NameValueCollec tion Coll = new NameValueCollec tion() ;
Coll.Add("TextB ox1" ,"ram") ;
Coll.Add("TextB ox2" ,"Shyam") ;
Coll.Add("Butto n1" ,"Button") ;
byte[] responseArray =
myWebClient.Upl oadValues("http ://192.168.96.33/TestPost/WebForm1.aspx", "POST
",Coll);
MessageBox.Show (System.Text.En coding.ASCII.Ge tString(respons eArray));
On server ther e is event
private void Button1_Click(o bject sender, System.EventArg s 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 = "applicatio n/x-www-form-urlencoded";
req.Method = "POST";
NameValueCollec tion Coll = new NameValueCollec tion() ;
Coll.Add("TextB ox1" ,"ram") ;
Coll.Add("TextB ox2" ,"Shyam") ;
Coll.Add("Butto n1" ,"Button") ;
byte[] responseArray =
myWebClient.Upl oadValues("http ://192.168.96.33/TestPost/WebForm1.aspx", "POST
",Coll);
MessageBox.Show (System.Text.En coding.ASCII.Ge tString(respons eArray));
On server ther e is event
private void Button1_Click(o bject sender, System.EventArg s e)
{
TextBox1.Text = "Yogesh" ;
Response.Write( TextBox1.Text + TextBox2.Text) ;
}
I need to call this event
Thanks in advance
Yogesh
Comment