title: Open external link with parameters
body: <p>I want to create a hyperlink or buttons that redirect user into an external website with parameters, looks something like this '<a href="https://externalsite.com?param1=var1&amp;param2=var2" rel="nofollow noreferrer">https://externalsite.com?param1=var1&amp;param2=var2</a>'. The problem is, if I copy the link to a browser, it works fine, but not when I click the link through hyperlink or buttons. All these only works on the Brave browser. It doesn't work on Chrome nor Firefox. What I mean by doesn't work is that the external shows an error page.</p>
  
  <p>If it works normally, the page will take the values from the parameters and fill up some forms, and the final URL changed a bit, probably had gone a certain process. It could be the external site own problem but I want to diagnose it first on my part</p>
  
  <p>Here is what I tried, simplified;</p>
  
  <p>Hyperlink</p>
  
  <pre><code>&lt;asp:HyperLink runat="server" NavigateUrl='&lt;%# makeURL(Eval("someID")) %&gt;' Target="_blank"&gt;Proceed to External site&lt;/asp:HyperLink&gt;
  </code></pre>
  
  <p>Or simply</p>
  
  <pre><code>&lt;a href='&lt;%# makeURL(Eval("someID")) %&gt;' Target="_blank"&gt;To External&lt;/a&gt;
  </code></pre>
  
  <p>Button</p>
  
  <pre><code>    &lt;button OnClick="toExternal('&lt;%# makeURL(Eval("someID")) %&gt;')"&gt;Proceed to External site&lt;/button&gt;
  
      &lt;script&gt;
      function toExternal(link)
      {
      x = confirm("To external link?");
  
      if (x)
      { open.window(link, '_blank') }
      }
      &lt;/script&gt;
  </code></pre>
  
  <p>ASP button.</p>
  
  <pre><code>&lt;asp:Button runat="server"  OnClientClick="toExternal('&lt;%# makeURL(Eval("someID")) %&gt;')" Text="To Extrernal" /&gt;
  </code></pre>
  
  <p>On inspection on the html source being generated, it looked something like the 1st hyperlink code, and when I copied into an empty html file and run, it worked. It just won't work pn Chrome/Firefox on an ASP page.</p>
  
  <p>Edit:
  Sample output from external page.</p>
  
  <p><a href="https://i.stack.imgur.com/U2ciV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U2ciV.png" alt="enter image description here"></a></p>
  
  <p>If it works, a form will appear, and fills up with information from the URL parameters.</p>