Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

window.open not working with ScriptManager.RegisterStartupScript

$
0
0

I injected a javascript block as follows..

StringBuilder sb1 = new StringBuilder();
sb1.Append("window.open('DMS/DMSHome.aspx','DMS:::','');");
ScriptManager.RegisterStartupScript(Page, typeof(Page), "mydialog", sb1.ToString(), true);

In this page there is no AJAX scriptmanager but I used ScriptManager.RegisterStartupScript which was working fine till yesterday. From today morning it stopped working in IE as well as in Google chrome. Where as alert messages using ScriptManager.RegisterStartupScript is working fine. Problem is only where I was opening a new window.

Then I changed the code and used 

Page.ClientScript.RegisterStartupScript(this.GetType(), "OpenWindow", "window.open('DMS/DMSHome.aspx','_newtab','left=100,top=20,width=1000,height=590');", true);

which is working fine.

Can anybody tell me what really happened so that window.open stopped working in ScriptManager.RegisterStartupScript


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>