When you want to open a new browser window on link button click.(not the same window)
add below code in your LinkButton
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");
}
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");
}
Great article, totally what I needed.
ReplyDeleteAlso visit my site - how to delete cookies from computer