November 1, 2011

Open New browser window on Link Button Click

When you want to open a new browser window on link button click.(not the same window)
add below code in your LinkButton

OnClientClick="aspnetForm.target ='_blank';"




see the below code sample


<asp:LinkButton ID="UploadCheckLink" runat="server" OnClientClick="aspnetForm.target ='_blank';" 
                onclick="UploadCheckLink_Click" >Upload Check Images</asp:LinkButton>



 protected void UploadCheckLink_Click(object sender, EventArgs e)
    {        
      Response .Redirect  ("NewWindow.aspx");


    }

1 comment:

  1. Great article, totally what I needed.
    Also visit my site - how to delete cookies from computer

    ReplyDelete