I have web part with link buttons.
How do I open a new page when I click on a link button and also use a query string for sending my variable id?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI have web part with link buttons.
How do I open a new page when I click on a link button and also use a query string for sending my variable id?
Will this work for you?
<asp:LinkButton runat="server" ID="lbJan" OnClick="lbMonth_Click" Text="ClickMe' CommandArgument="1" >
protected void lbMonth_Click(object sender, EventArgs e)
{
string redirect = "<script>window.open('/Pages/Page1.aspx?sID=" + e.CommandArgument.ToString() + "' );</script>";
Response.Write(redirect);
}