Posting Data To WebBrowser Control In C#
Good day!
Basically, it is possible to post data to web browser control using C#. The code below, was referenced from MSDN, but i slightly modified some of it's functionalities.
Basically, it is possible to post data to web browser control using C#. The code below, was referenced from MSDN, but i slightly modified some of it's functionalities.
string url = "http://example.com"; string postData = String.Format("city=DC&Page={0:00}",pageNum); byte[] Post = Encoding.UTF8.GetBytes(postData ); string AdditionalHeaders = "Content-Type: application/x-www-form-urlencoded"; //wbSample is the web browser control //the WebNavigate method is just a simple method i created //which simply assigns url to the browser, the post data and additional headers WebNavigate(wbSample , ListURL, "", Post, AdditionalHeaders);
Comments
Post a Comment