title: call href click on document.ready
body: <p>a have two aspx pages <strong>page1.aspx</strong> and <strong>page2.aspx</strong>.<br>
  i have an <code>href</code> in <strong>page1.aspx</strong>  <code>&lt;a id="GoHref" href="page2.aspx"&gt;</code><br>
  i want that when users click <code>docHref</code> to be redirected to <strong>page2.aspx</strong> and download a doc file via an automatic click on <code>&lt;a id="DocHref" runat="server"&gt;</code></p>
  
  <p>page2.load is as below:</p>
  
  <pre><code>       protected void Page_Load(object sender, EventArgs e)
      {
  
         if(!IsPostBack)
              DocHref.HRef="./mydoc.doc";
      } 
  </code></pre>
  
  <p>i 'd like to do do an automatic click on <code>document.ready</code>, something like this:</p>
  
  <pre><code>     $(document).ready(function() {
  
           $('#DocHref').trigger('click');
  
      });
  </code></pre>
  
  <p>But it doesn't work !!<br>
  is this a good way to download a doc file ? Or there a better server side way?</p>
  
  <p>Thanks in advance.</p>