Users Pricing

articles

home / developersection / articles / introduction to open new browser window using c#.net
Introduction to Open New Browser Window using C#.Net

Introduction to Open New Browser Window using C#.Net

mohan kumar 16039 02 May 2012 Updated 26 Dec 2019

If you want to open new browser window then you can use this code.

<asp:Button ID="ButtonView" OnClick="ButtonView_Click" runat="server" Text="View" Width="80px" />

protected void ButtonView_Click(object sender, EventArgs e)
{
    string Fullurl = "newpage.aspx/";   
    OpenNewBrowserWindow(Fullurl, this);
}

 //This is used to open new browser window
public static void OpenNewBrowserWindow(string Url, Control control)
{
    ScriptManager.RegisterStartupScript(control, control.GetType(), "Open""window.open('" + Url + "');"true);
} 

 


mohan kumar

Other

Having around 5 Years experience in .NET domain.


3 Comments