Use WebClient to send a message by sending any search page options. In the nusing Html Agility pack, you can parse the returned html.
WebClient will have the html that was returned by the search result.
Something like that:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://exposureroom.com"); request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; string formParameters = "name1=value1&name1=value2"; byte[] requestBuffer = Encoding.ASCII.GetBytes(formParameters); var requestStream = request.GetRequestStream(); requestStream.Write(requestBuffer, 0, requestBuffer.Length); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader reader = new StreamReader(response.GetResponseStream()); string str = reader.ReadToEnd();
In your case, the string variables formparameters should contain the query parameters that the search page requires. Then these parameters will be sent to your search page in the form of the "POST" Http method. Of course, the url must also be changed to your url.
source share