.net – HttpWebRequest submit – Education Career Blog

Sorry for such popular question, but,
i don’t need fill anything, i just need press a submit button on html page, how can i do it, via HttpWebRequest?


Well, you need to know:

  • Whether there are any hidden pre-populated fields or other data required for the submission
  • The URL to submit to
  • The HTTP method (GET/POST)

But yes, it can all be done with HttpWebRequest.

If you don’t have any extra data, it may be as simple as creating the web request, setting the method appropriately, and then calling GetResponse. If you need to include data, it may be in the query part of the URL (if it’s a GET request) or the body (if it’s a POST request).

Leave a Comment