I am using below code to open the new window from server side
string UserId = "99798";
string url = "http://www.XYZ.com?Id='"+UserId+"&MatId=12";
StringBuilder sb = new StringBuilder();
sb.Append("<script>");
sb.Append("window.open("+url+", 'my_App', '');");
sb.Append("</scri");
sb.Append("pt>");
Page.RegisterStartupScript("test", sb.ToString());
But it is giving me javascript error
Expected ')'
But everything is working fine when URL = "http://www.google.com";
What is the error? How can I resolve this