Its almost 2 AM here at my place, need a sound sleep from so many days but before that let me share this trick with you all.
Here is a small excerpt from my code
AxWebBrowser wb = new AxWebBrowser ();
object vPost = null;
object vHeaders = null;
object obj = null;
object url = “http://www.yoururl.com/yourpage”;
object cPostData = null;
cPostData = “var1=data1&var2=datra2&var3=data3&var4=data4”;
vHeaders = “Content-Type: application/x-www-form-urlencoded” + Convert.ToChar(10) + Convert.ToChar(13);
(You can add other headers as required)
vPost = ASCIIEncoding.ASCII.GetBytes((string)cPostData);
wb.Navigate2(ref url, ref obj, ref obj, ref vPost, ref vHeaders);
This is all it takes to post data programmatically to a page using Web Browser control in you desktop application.
Hope this helps you, if you have any queries please feel free to ask.