如何打开没有菜单栏或其他工具栏的新窗口? [英] How to open new window which has no menubar or other toolbars?
本文介绍了如何打开没有菜单栏或其他工具栏的新窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["Username"] != null)
{
if (Request.QueryString["SMS"] == "yes")
{
Label1.Text = "Message Submitted Successfully";
//here I want to open new window
}
else
{
Label1.Text = "";
}
}
else
{
Response.Redirect("Login.aspx");
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("GenSMS.aspx");
}
protected void Button3_Click(object sender, EventArgs e)
{
Response.Redirect("SchSMS.aspx");
}
protected void Button4_Click(object sender, EventArgs e)
{
Response.Redirect("AtnSMSD.aspx");
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("ResSMS.aspx");
}
}
推荐答案
您无法通过在后台代码中进行简单的重定向来做到这一点.您需要使用JavaScript来调用带有适当参数的window.open
http://www.javascript-coder.com/window-popup/javascript-window- open.phtm [^ ]
You can''t do it by simple redirecting in your code-behind. You need to use JavaScript to call window.open with the appropriate parameters
http://www.javascript-coder.com/window-popup/javascript-window-open.phtm[^]
Mark的链接没有为我打开,所以通过了它.
在这里看看: Window.open方法 [
Mark''s link was not opening for me so went through it.
Have a look here: Window.open Method[^]
There are lots of features about the new window that you can define. Like to show toolbar, fullscreen, location, etc.
这篇关于如何打开没有菜单栏或其他工具栏的新窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文