例如下面的代码
           <a target="wndTest" href ="Hello.aspx?test=1">aaaa</a>            </td>
            <td style="height: 14px">
                <iframe id="wndTest" height="400" 
                    src="hello.aspx" style="margin-bottom: 15px" width="100%"></iframe>
            </td>单击连接"aaaa"时,总是弹出新的窗口,为什么?

解决方案 »

  1.   

    这与asp.net 2.0 还是3.0没有关系.这是HTML的问题.
      

  2.   

    <a target="wndTest" href ="webform2.aspx?test=1">aaaa</a>
    <iframe id="wndTest" height="400" name="wndTest"
                        src="default.aspx" style="margin-bottom: 15px" width="100%"></iframe>
      

  3.   

    楼主的iframe缺少了name属性,
    target="wndTest" 指向的是name为wndTest的地方,而不是id为wndTest的地方,改为: <a target="wndTest" href ="Hello.aspx?test=1">aaaa</a>            </td>
                <td style="height: 14px">
                    <iframe id="wndTest" height="400" name="wndTest"
                        src="hello.aspx" style="margin-bottom: 15px" width="100%"></iframe>
                </td>