I have application which opens HTML document. You can edit the document with HTML editor. Next, btnPreview opens a new window and shows changes you made in Internet Explorer (IE - default browser).
Here is original code - works OK when you run from both - Visual Studio 2010 (http://localhost:50827/NCSite/MenuEditor.aspx) or via browser IE (http://localhost/NCSite/MenuEditor.aspx).
...
URL = Request.Url.Scheme + "://" + Request.Url.Host + appPath + URL;
ClientScriptManager cs = Page.ClientScript;
ClientScriptManager cs = Page.ClientScript;
cs.RegisterStartupScript(this.GetType(), "NewWindow", "");
...
Now I have a request to add two more buttons to preview in Google Chrome and Mozilla Firefox.
I used next code:
...
//for btnIE:
URL = Request.Url.Scheme + "://" + Request.Url.Host + appPath + URL;
Process.Start("iexplore", URL);
Process.Start("iexplore", URL);
//for btnGC:
URL = Request.Url.Scheme + "://" + Request.Url.Host + appPath + URL;
Process.Start("chrome", URL);
Process.Start("chrome", URL);
//for btnFF:
URL = Request.Url.Scheme + "://" + Request.Url.Host + appPath + URL;
Process.Start("firefox", URL);
Process.Start("firefox", URL);
...
It works OK when you run from Visual Studio 2010 (http://localhost:50827/NCSite/MenuEditor.aspx) but when you run from btnIE, btnGC, or btnFF it simply replacing existing window and shows updated document via IE. Processes for GC and FF not even started.
Is it any way to solve that issue?
Thanks,
dm
open_door8Posted Nov 12, 2014, 12:28 PM
Yes, I want new popup window every time. Can you give me an example?
Tnx,
dm
Pradeep ShetPosted Nov 12, 2014, 7:43 AM
Is it that you want to open in new popup window everytime?
In that case try to paas different key everytimr in your window.open() method second parameter.
This will help you to open different popup window instead of refreshing same window.
Hope this answers your query. If yes mark it as answered.