我有一个母板页连接,当点这个连接的时候只刷新子板不刷主板,如何实现?如下<!--
<HTML>
母版内容
<a href="连接子板的任意一个页">
...
<div>
    <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
    </asp:contentplaceholder>
</div>
...
<HTML>
母版内容问1:当我点连接的时候只刷新子版不刷新主版,如何实现?
问2:当我在母版的CS代码中,想跳转到任意一个子版,但不刷新主版,怎么写呢?谢谢各位大虾了~

解决方案 »

  1.   

    用框架窗体iframe
    主页面<A class="line_e" href="连接子板的任意一个页" target="I4">&nbsp;内容&nbsp;&nbsp;&nbsp;&nbsp;</A>
    <iframe id="main" name="I4" marginWidth="1" marginHeight="1" src="help.aspx" frameBorder="0"
    width="98%" scrolling="auto" height="550"></iframe>
      

  2.   

    我用的是母版页,不是用iframe.....
      

  3.   

    问题2,我是没在后台写过母版页处理子版页的这种跳转一般都不通过子版页的,都是子版页和子版页之间的操作这句代码写在子版页里的话就只跳转子版页,一般来讲,模板页除了读取节点什么的都是不参与操作的
    Response.Write("<script>window.location.href='go.aspx'</script>");
      

  4.   

    哦,我的母版页有颗树,TreeView,内容和连接都是动态生成的,都在CS代码中,点树的时候刷新子版,不刷母版...好难哦~
      

  5.   

    哦,我的母版页有颗树,TreeView,内容和连接都是动态生成的,都在CS代码中,点树的时候刷新子版,不刷母版...好难哦~
      

  6.   

    vs2008的话,用updatePanel试一下。
      

  7.   

    哦,Sorry,我忘记说明了,我用的是.net2005
      

  8.   

    主页中<FRAMESET id="mainframe" name="mainframe" border="0" frameSpacing="0" rows="25,*,25" marginwidth="0"
    marginheight="0" leftmargin="0" topmargin="0">
    <FRAME border="0" name="title" marginWidth="0" borderColor="#e4e4e4" marginHeight="0" src="top.html"
    frameBorder="no" noResize scrolling="no" leftmargin="0" topmargin="0">
    <FRAMESET border="0" name="search" frameSpacing="0" frameBorder="1" cols="170,*" marginwidth="0"
    marginheight="0" leftmargin="0" topmargin="0" rightmargin="0">
    <FRAME style="BORDER-TOP: #000000 1px solid" name="left.aspx" borderColor="#e4e4e4" marginHeight="0"
    src="leftmenu.aspx" scrolling="yes">
    <FRAME id="mainFrame" style="BORDER-TOP: #000000 1px solid; BORDER-LEFT: #ffffff 2px groove"
    border="2" name="frmEditor" marginWidth="0" borderColor="#e4e4e4" marginHeight="0"
    src="Right.aspx" frameBorder="no" scrolling="auto">
    </FRAMESET>
    <FRAME border="0" name="title" marginWidth="0" borderColor="#e4e4e4" marginHeight="0" src="bottom.aspx"
    frameBorder="no" noResize scrolling="no" leftmargin="0" topmargin="0" style="BORDER-TOP: #000000 1px solid; BORDER-LEFT: #ffffff 2px groove">
    </FRAMESET>leftMenu.aspx页,我只发个尾巴,主要就是靠 parent.mainFrame.location.href 来连接case "LIMIT_PRICE_MANAGE_INFO":   //物价信息
    parent.mainFrame.location.href="BasePage/PM_PriceInfo.aspx";
    break;

    case "LIMIT_SALE_BACK_VCHTYPE": //销售退货
    parent.mainFrame.location.href="sale/j_SaleBack.aspx?billtype=45"
    break;
    case "LIMIT_GATHERING_VCHTYPE": //收款单
    parent.mainFrame.location.href="sale/j_gatheringVch.aspx?billtype=4" break;
    case "LIMIT_RETAILSALE_VCHTYPE":        //零售单 ( 实际上现已为POS单功能所用 )
    t=(screen.availHeight-250)/2 ;
    l=(screen.availWidth-280)/2;
    f="height=180,top=" + new String(t)+",left="+new String(l)+",width=295,location=no,menubar=no,resizable=no,toolbar=no";
    window.open("Retail_Bill/j_RetailBillSelInfo.aspx?billtype=305","",f,false);      
    break;


    case "LIMIT_VCH_DRAFT": //业务草稿
    t=(screen.availHeight-340)/2 ;
    l=(screen.availWidth-380)/2;
    f="height=340,top=" + new String(t)+",left="+new String(l)+",width=380,location=no,menubar=no,resizable=no,toolbar=no";
    open("vch/js_FiltDraftBillBase.aspx","",f,false);
    break;
    case "LIMIT_VCH_SEARCH": //经营历程
    t=(screen.availHeight-370)/2 ;
    l=(screen.availWidth-380)/2;
    f="height=370,top=" + new String(t)+",left="+new String(l)+",width=380,location=no,menubar=no,resizable=no,toolbar=no";
    open("vch/j_BillIndexAuditConditionInput1.aspx","",f,false);
    break;
    case "LIMIT_SALE_DAYREPORT": //经营日报
    t=(screen.availHeight-330)/2 ;
    l=(screen.availWidth-380)/2;
    f="height=330,top=" + new String(t)+",left="+new String(l)+",width=380,location=no,menubar=no,resizable=no,toolbar=no";
    open("VCH/QueryTypeInput.aspx?InputType=P","",f,false);
    break; 

    case "LIMIT_INVOICE_STAT": // 发票查询
    t=(screen.availHeight-360)/2 ;
    l=(screen.availWidth-380)/2;
    f="height=360,top=" + new String(t)+",left="+new String(l)+",width=380,location=no,menubar=no,resizable=no,toolbar=no";
    open("vch/j_invoiceInput.aspx","",f,false);
    break;
         }
        }
    </script>
    </HEAD>
    <body bgColor="#9dbdf0" leftMargin="0" topMargin="0" MS_POSITIONING="GridLayout">
    <form id="Form2" method="post" runat="server">
    <TABLE id="Table1" cellSpacing="1" cellPadding="1" border="0">
    <TR>
    <TD>
    <iewc:TreeView id="TvwDoc" runat="server" SelectExpands="True"></iewc:TreeView></TD>
    </TR>
    <TR>
    <TD></TD>
    </TR>
    </TABLE>
    </form>
    </body>
    </HTML>
      

  9.   

    还是没有找到答案....
    详细描述:
    1.子板页跳转子板页时,母版页不刷新。在CS代码中跳转与Html中跳转都不刷新
    2.母版页跳转子板页时,母版页不刷新。在母版页的CS代码中跳转与Html中跳转都不刷新跪求!!<!-- 
    <HTML> 
    母版内容 
    <a href="连接子板的任意一个页">   <!--母版页在Html中跳转子板页,如何不刷新母版-->
    ... 
    <div> 
        //子板页
        <asp:contentplaceholder id="ContentPlaceHolder1" runat="server"> 
        </asp:contentplaceholder>     
    </div> 
    ... 
    母版内容
    </HTML> 
    --> 
      

  10.   

    HTML的<A....>有个属性是设置刷新目标的.具体叫什么忘记了.
      

  11.   

    外边加个iframe   不过05里边的母版页太难用