Found a great little snip of code online today from csharphelp.com about how to open a new browser window from a C# codebehind:
Response.Write("<SCRIPT language=javascript>var w=window.open('Rpt_OrderStatus_Form.aspx','OrderStatus','height=800,width=800');</SCRIPT>");
…but, one of the comments on that thread is that the Response.Write disrupts the page appearance. Any thoughts/suggestions on a better way to open a new browser window from a C# codebehind?





June 13, 2008 at 8:03 pm
Try this:
ClientScript.RegisterStartupScript( this.GetType(), “PopupWindow”, “var w=window.open(’Rpt_OrderStatus_Form.aspx’,'OrderStatus’,'height=800,width=800′);” );
June 13, 2008 at 9:23 pm
Oh, nice! Thanks!