Sunday, 8 June 2014

Open new tab in asp.net code behind

//HTML

<asp:Button ID="Button1" runat="server" Text="Button" 
onclick="Button1_Click" 
OnClientClick ="document.forms[0].target = '_blank';" />



//Code Behind


protected void Button1_Click(object sender, EventArgs e)
    {
        string newtabl = @"~/FrmNewContent.aspx";
        Response.Redirect(newtabl);       
    }

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...