Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have written the following code to open a new window and it works well.
ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "var Mleft = (screen.width/2)-(760/2);var Mtop = (screen.height/2)-(700/2);window.open( 'Reports/Smt_StyleWiseReportWindow.aspx?', null, 'height=700,width=760,status=yes,toolbar=no,scrollbars=yes,menubar=no,location=no,top=\'+Mtop+\', left=\'+Mleft+\'' );", true);


Is it possible to open a new Tab on button click event. My default browser is Google Crome. advance thanks for help.
Posted
Updated 29-Sep-14 1:40am
v2

1 solution

Hi
You can try like this

<a href="Default.aspx" target="_blank">Home</a>


Thanks
 
Share this answer
 
v3
Comments
Sumon562 29-Sep-14 8:08am    
in google crome it open new window.
Praveen_P 29-Sep-14 8:20am    
working fine in firefox also
Sergey Alexandrovich Kryukov 29-Sep-14 11:02am    
Here is the thing: what happens on new window.open is not standardized and can be different for different browsers. In my observations, it depends on parameters.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900