我喜欢在我的项目中打开一个新窗口。我在我的项目中使用两个面板当我点击gridview(panel1)中的“Viewdocument”链接时,它应该显示打开该文件的窗口。但在我的代码中,它不工作,任何人都可以帮助我解决这个问题。这是代码。如何在C中打开新窗口#
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 = @"<script language=""javascript"">" + "window.open(" + fileNQuery + WindowName + "," + "menubar=Yes,toolbar=No,resizable=Yes,scrollbars=Yes,status=yes" + ");" + "</script>";
ClientScript.RegisterStartupScript(this.GetType(), "OpenWindow", script);
}
由于提前
什么是您的案例中的“打开新窗口”?打开一个Aspx页面? –