我喜歡在我的項目中打開一個新窗口。我在我的項目中使用兩個面板當我點擊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頁面? –