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=" ='_blank';"

see the below code sample

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

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


1 comment: