title: How to scrape website with filling some input text and click submit button in .NET Core C#
body: <p>I am scraping a website which is done in classic asp.net. It has 2 fields with ID. One is input text and another one is a Button. I need to fill in the input box and click the button. And also get the response. The button is a Submit type.</p>
  
  <p>I was using HTML Agility pack. But it's not sufficient with filling the input box and click the button.</p>
  
  <p>Example of the code is :
  '</p>
  
  <pre><code>            &lt;table class="MainTable"&gt;
                  &lt;tbody&gt;
                  &lt;tr&gt;
                      &lt;td class="styleIndent"&gt;&amp;nbsp;&lt;/td&gt;
                      &lt;td class="Labels"&gt;&lt;span id="ctl00_MainContent_lblLastName" class="fieldHeader" for="ctl00_MainContent_txtLastName"&gt;Name:&lt;/span&gt;&lt;/td&gt;
                      &lt;td class="styleColumnBody"&gt;
                          &lt;input name="ctl00$MainContent$txtLastName" type="text" value="sberbank" maxlength="250" id="ctl00_MainContent_txtLastName" tabindex="2" title="Enter name as search criteria." style="width:200px;"&gt;
                      &lt;/td&gt;
                      &lt;td class="Labels"&gt;&lt;span id="ctl00_MainContent_lblCity" class="fieldHeader" for="ctl00_MainContent_txtCity"&gt;City:&lt;/span&gt;&lt;/td&gt;
                      &lt;td class="styleColumnBody"&gt;
                          &lt;input name="ctl00$MainContent$txtCity" type="text" maxlength="250" id="ctl00_MainContent_txtCity" tabindex="6" title="Enter city name as search criteria." style="width:200px;"&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
  
                      &lt;td class="Labels"&gt;&lt;/td&gt;
                      &lt;td style="text-align: left"&gt;
                          &lt;input type="submit" name="ctl00$MainContent$btnSearch" value="Search" id="ctl00_MainContent_btnSearch" tabindex="9" style="font-weight:normal;height:22px;width:96px;"&gt;&amp;nbsp;&amp;nbsp;
                          &lt;input type="submit" name="ctl00$MainContent$btnReset" value="Reset" id="ctl00_MainContent_btnReset" tabindex="10" style="font-weight:normal;height:22px;width:96px;"&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/tbody&gt;&lt;/table&gt;
  </code></pre>
  
  <p>'</p>
  
  <p>It's a Classic .Net where the page is reloaded on a button click (<strong>ctl00_MainContent_btnSearch</strong>). So it's hard to know anything by inspecting the page: </p>