Question

I want to open the URL in new tab not in same window . Also not open as popup .

if (objKVP.Key == "page" && objKVP.Value == "True")
   {
        Response.Redirect("https://x.v.com/login.aspx");
   }
Was it helpful?

Solution

Hope this will help you

ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "var Mleft = (screen.width/2)-(760/2);var Mtop = (screen.height/2)-(700/2);window.open( 'your_page.aspx', null, 'height=700,width=760,status=yes,toolbar=no,scrollbars=yes,menubar=no,location=no,top=\'+Mtop+\', left=\'+Mleft+\'' );", true);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top