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).
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.
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.
Is what I am trying to do impossible?
Thanks
EDIT:
I've tried both these in my .cs file, but neither worked:
ClientScript.RegisterStartupScript(GetType(), "openwindow", "window.open('" + url + "','_preview'");
Response.Write("<script type='text/javascript'>detailedresults=window.open('" + url + "');</script>");