ASP.NET子窗口中打开一个新的窗口上每一个岗位背 [英] ASP.NET child window opens up on a new window on every post back
问题描述
我有一个格一个asp.net页面。在RowDateBound事件
I have an asp.net page with a grid. On RowDateBound event
mybutton.Attributes.Add("onclick", "javascript:window.showModalDialog('some.aspx?ID="
+ mybutton.CommandArgument +
"','window.self','dialogWidth:800px; dialogHeight:800px;center:yes; status:yes; scroll:no; help:no');");
some.aspx页我有下拉列表和asp.net按钮,它一回发postback.On在some.aspx页上的一个新的窗口(浏览器)将再次打开。
on some.aspx page I have dropdowns and asp.net button that does a postback.On postback the some.aspx page opens again in a new window (Browser).
如何prevent呢?
How to prevent this?
我AP preciate您的支持。
I appreciate your support.
推荐答案
我以前用ASP.NET和ModalDialog有这个问题。你需要做的是将&LT什么;基地目标=_自我>在页面头部
标记。这听起来太简单了是正确的,但它是什么固定它适合我。
I've had this problem before with ASP.NET and a ModalDialog. What you need to do is set the <base target="_self">
tag in the head of the page. It sounds too simple to be correct but it's what fixed it for me.
这沮丧我还真不少。
如果您需要任何帮助,只是问。
If you need any help with this, just ask.
<html>
<head>
<title>My Page</title>
<base target="_self">
</head>
<body>
<!-- Your content -->
</body>
</html>
这篇关于ASP.NET子窗口中打开一个新的窗口上每一个岗位背的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!