I am trying to open a new tab when a button from a Gridview is clicked. I want to know how to properly attach the parameter from the Gridview to the URL. The error I get is the sever tab is not properly formed. I am not interested in the Response.Write method as I had issues with that and I am already using SelectedIndexChanged for something else.
<asp:Button ID="btnViewClient" runat="server" Text="View Client" CssClass="btn"
OnClientClick="window.open('localhost:5000/test/test.aspx?client_id?='+ <%# Eval("id") %>) +'" />
You need to use a data-binding expression for that.
And if you do not want to trigger a PostBack also when the button is clicked, add
return falseto it.