title: How do I click button and get excel file by C#?
body: <p>I want to download file by button from  <a href="http://www.krx.co.kr/m2/m2_1/m2_1_8/JHPKOR02001_08.jsp" rel="nofollow">http://www.krx.co.kr/m2/m2_1/m2_1_8/JHPKOR02001_08.jsp</a></p>
  
  <p>the button is with text "다운로드" in the upper right side</p>
  
  <p>"다운로드" means download</p>
  
  <p>if the button is clicked, i can download excel file at webbrower</p>
  
  <p>here is web page source</p>
  
  <pre><code>&lt;a href="?" onclick="doExcel(); return false;" title="조회결과 다운로드"&gt;
      &lt;img     src="http://inc.krx.co.kr/image/cm/btn/bt1download.gif" alt="다운로드" id="excelBtn" style="display:none" /&gt;
  &lt;/a&gt;
  &lt;input type="submit" name="excelBtn2" id="excelBtn2" value="다운로드" /&gt;
  </code></pre>
  
  <p>I want to get the excel file by c# program</p>
  
  <p>so I run below code with System.Windows.Forms.WebBrowser</p>
  
  <pre><code>webBrowser.Document.InvokeScript("doExcel()");
  </code></pre>
  
  <p>but I cant get excel file</p>
  
  <p>how do i get excel file like clicking button?</p>
  
  <p>and what I have to learn to solve problem like this?</p>