How to open the new window in C#
<p>I like to open a new window in my project. I am using two panels in my project When I click the "Viewdocument" link in gridview(panel1) it should display the window to open that file. But in my code its not working can any one help me to solve this issue. Here is the code.</p>

<pre><code>if (myReader.Read())
                {
                    myReader.Close();
                    openWIndow("fr_OpenFile.aspx", "", fileName);
                    Linkbutton_ModalPopupExtender.Show();
                    //OpenMyFile();
                }
                else
                {
                    myReader.Close();
                    Message("Cannot open selected file");
                    Linkbutton_ModalPopupExtender.Show();
                    return;
                }
                con.Close();
                //OpenMyFile();
            }
            else
            {
                Message("File not found");
                Linkbutton_ModalPopupExtender.Show();

            }

        }
        catch (Exception ex)
        {
            lblmsg.Text = ex.Message;
        }

    }
 private void openWIndow(String FileName, String WindowName, String qString)
    {
        String fileNQuery = FileName + "?value=" + qString;
        String script =  @"&lt;script language=""javascript""&gt;"  + "window.open(" + fileNQuery +  WindowName + "," + "menubar=Yes,toolbar=No,resizable=Yes,scrollbars=Yes,status=yes" + " );" + "&lt;/script&gt;";
        ClientScript.RegisterStartupScript(this.GetType(), "OpenWindow", script);
    }
</code></pre>

<p>Thanks in Advance</p>
