I try to save the url in the config file, but it does not work when I extract the url from the file
Below is my code
In web.config I have
<add key="URL" value="/NG/Viewer/ViewerSummary.aspx"/>
On my aspx.cs page, I have the following code
string url = ConfigurationManager.AppSettings["URL"]; string strScript = "window.open(url?QueryID=" + QueryId + "', '_blank','height=650, center:yes, width=800, status=no, resizable= yes, menubar=no, toolbar=no, location=yes, scrollbars=yes, status=no');"; ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "strScript", strScript, true);
the window does not open if I write the above code, but the window opens if I do it below the code.
string strScript = "window.open('/NG/Viewer/ViewerSummary.aspx?QueryID=" + QueryId + "', '_blank','height=650, center:yes, width=800, status=no, resizable= yes, menubar=no, toolbar=no, location=yes, scrollbars=yes, status=no');"; ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "strScript", strScript, true);
How can I open a window by placing a value in a configuration file?
Any help is appreciated.
Thanks.