Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在IE(ASP.NET)上打开新选项卡时,文档模式更改为Quirk_Asp.net_Internet Explorer_Window.open_Quirks Mode - Fatal编程技术网

在IE(ASP.NET)上打开新选项卡时,文档模式更改为Quirk

在IE(ASP.NET)上打开新选项卡时,文档模式更改为Quirk,asp.net,internet-explorer,window.open,quirks-mode,Asp.net,Internet Explorer,Window.open,Quirks Mode,我有一个按钮点击事件,它执行一些服务器端工作,并最终打开一个新选项卡。但当这种情况发生时,Internet Explorer上的“家长”选项卡变得非常奇怪。然后我发现文档模式改为怪癖模式,使整个网站向左移动,而不是向中间移动,我也失去了一些样式。我尝试了下面的代码,但仍然发生 <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta http-equiv="X-UA-Compatible" cont

我有一个按钮点击事件,它执行一些服务器端工作,并最终打开一个新选项卡。但当这种情况发生时,Internet Explorer上的“家长”选项卡变得非常奇怪。然后我发现文档模式改为怪癖模式,使整个网站向左移动,而不是向中间移动,我也失去了一些样式。我尝试了下面的代码,但仍然发生

    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

有人能告诉我为什么会发生这种情况以及如何解决这个问题吗?谢谢

我的代码示例

    Sub btnTeachersView_Click
    ........ server side code ........
    Response.Write("<script>")
    Response.Write("window.open('../abc.aspx','_blank')")
    Response.Write("</script>")
    End Sub
子btnTeachersView\u单击
........ 服务器端代码。。。。。。。。
回答。写(“”)
Response.Write(“window.open('../abc.aspx','u blank'))
回答。写(“”)
端接头

注意:它需要在服务器端,因为还有其他工作需要先完成,我的客户希望它在一个新的选项卡中,所以我不能直接重定向到该页面。

尝试用正确的
标记包装您的
标记和doctype等。我认为这可能是触发怪癖模式的问题,缺少正确的dtd

尝试将您的
标记包装在正确的
标记中,并使用doctype等。我认为这可能是触发怪癖模式的问题,缺少正确的dtd

我也有同样的问题。我能找到的唯一解决方法是导航到一个空白位置,然后将该值设置为所需的位置。像这样:

var newWindow = window.open('', '_blank');
newWindow.location = '../abc.aspx';
在VB中:

Response.Write("<script>")
Response.Write("var newWindow = window.open('','_blank');")
Response.Write("newWindow.location = '../abc.aspx';")
Response.Write("</script>")
Response.Write(“”)
Response.Write(“var newWindow=window.open”(“空白”))
Response.Write(“newWindow.location=”../abc.aspx';”)
回答。写(“”)

我也有同样的问题。我能找到的唯一解决方法是导航到一个空白位置,然后将该值设置为所需的位置。像这样:

var newWindow = window.open('', '_blank');
newWindow.location = '../abc.aspx';
在VB中:

Response.Write("<script>")
Response.Write("var newWindow = window.open('','_blank');")
Response.Write("newWindow.location = '../abc.aspx';")
Response.Write("</script>")
Response.Write(“”)
Response.Write(“var newWindow=window.open”(“空白”))
Response.Write(“newWindow.location=”../abc.aspx';”)
回答。写(“”)

对不起,迪伦。。这样做对我没有帮助。谢谢,对不起,迪伦。。这样做对我没有帮助。谢谢,嗨,Onkelborg,实际上你的代码解决了这个问题。。但是我已经改变了所有的代码,并用新的方式重写了它。。忘了看这篇文章了。谢谢你,实际上你的代码解决了这个问题。。但是我已经改变了所有的代码,并用新的方式重写了它。。忘了看这篇文章了。谢谢