title: asp:LinkButton code to open new browser window/tab after other code
body: <p>For my internal webpage at work, I display a DataGrid based on entries in a SQL table (not directly, but with some processing on entries).</p>
  
  <p>Each row in the DataGrid has a button that the user clicks. I need this button to open a new window or tab (I believe I can't decide as this is based on browser config) and also change a value in the SQL table to say the button was clicked.</p>
  
  <p>If I use an asp:Hyperlink then the page opens nicely, but I don't know how to update SQL. Vice-versa if I use an asp:LinkButton I can get the SQL updated but can't get a new page to open.</p>
  
  <p>Is what I am trying to do impossible?</p>
  
  <p>Thanks</p>
  
  <p>EDIT:</p>
  
  <p>I've tried both these in my .cs file, but neither worked:</p>
  
  <pre><code>ClientScript.RegisterStartupScript(GetType(), "openwindow", "window.open('" + url + "','_preview'");
  
  Response.Write("&lt;script type='text/javascript'&gt;detailedresults=window.open('" + url + "');&lt;/script&gt;");
  </code></pre>