没有这个问题,我用过的
<script language="javascript">
<!--
function openwin1(id) 
{  
var window_width = 400; 
var window_height = 265; 
var window_top = (screen.height-window_height)/2; 
var window_left = (screen.width-window_width)/2; 
    newWindow=window.open("showTemporory.aspx?id="+id+"","","height="+window_height+",width="+window_width+",left="+window_left+",top="+window_top+",resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no"); 
    newWindow.focus(); 
}  
//-->
</script><asp:TemplateColumn HeaderText="其它" FooterText="其它">
<ItemTemplate>
<asp:Label runat="server" Font-Size="10" Width="30" ID="Label1">
<a href='<%#  "javascript:openwin1("+DataBinder.Eval(Container.DataItem,"temporaryId").ToString() +")" %>' >
其它</a>
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>

解决方案 »

  1.   

    我这样写的话就打不开新窗口了
    <a href='<%# "javascript:window.open('AddMember.aspx','sub','width=300 height=300')" %>'>增加新会员</a>
      

  2.   

    改成这样试试
    <a href='<%# "javascript:window.open('AddMember.aspx','sub','width=300 height=300')" %>'>增加新会员</a>
    改为
    <a href="<%# 'javascript:window.open(\'AddMember.aspx\',\'sub\',\'width=300 height=300\')' %>">增加新会员</a>
      

  3.   

    其实你可以按qiweiyong(qwy)的方法在<ItemTemplate>中放入Label,把Label的Text设置为你的打开的脚本语句.如:
    Label1.Attributes.Add("onclick","javascript:window.open('AddMember.aspx','sub','width=300 height=300')");
      

  4.   

    我试了一下,总结出来的是:
    <a href='javascript:window.open.............'
    这样子不好用,是会出现你窗口什么都没有的问题,
    但是如果改成
    <a href=执行函数,打开新窗口,成功
    或者也可以改成
    <a href="#" onclick='javascript....'也成功.
    不知道为什么.
      

  5.   

    我想可能是因为href="#"是联接到本地,onclick执行的是jscrip脚本,所以会正常,而用 <a href='javascript:window.open.............'>则是联接到这个javascript脚本,当然找不到东西,只有一个object对象了.
    不知道这种理解是否正确..??
      

  6.   

    to:benmo2000
    你这种方法可以,但是因为我在子窗口还有一个对父窗口的刷新,如果父窗口变成了“父窗口.asp#”就不能进行这个刷新的动作了