如何实现框架页左边的页面点一个按钮以后右边页面对应变化啊,原来的html页在dreamware里可以很容易实现,现在用asp.net就不会了,我的想法是点左边一个按钮以后建立一个session然后传到右边,右边的页面在page_load里面根据session跳转到不同页面,现在session是传过去了,可是不知道如何让右边的页面刷新... 各位高手给指点指点... 或者有其他的方法来实现?

解决方案 »

  1.   

    <html>
    <head>
    <title>MainForm</title>
    <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" Content="C#">
    <meta name="vs_defaultClientScript" content="JavaScript">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">

    </head>
    <frameset border="0" frameSpacing="0" rows="90,78%,32" frameBorder="0">
    <frame id="topFrame"  name="topFrame" src="topFrame.htm" scrolling="no" noresize>
    <frameset cols="145,10,*" id="mainindex">
    <frame id="menuFrame" name="menuFrame" src="LeftMenu.htm" frameBorder="no" noResize scrolling="no">
    <frame src="default.htm" frameBorder="no" noResize scrolling="no">
    <frame id="mainFrame" name="mainFrame" src="webform1.aspx">
    </frameset>
    <frame name="bottomFrame" src="bottomFrame.htm" noResize scrolling="no">
    <noframes>
    <p id="p1">
    此 HTML 框架集显示多个 Web 页。若要查看此框架集,请使用支持 HTML 4.0 及更高版本的 Web 浏览器。
    </p>
    </noframes>
    </frameset>
    </html>
    ************************
    <html>
    <head>
    <title></title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
    <meta name="ProgId" content="VisualStudio.HTML">
    <meta name="Originator" content="Microsoft Visual Studio .NET 7.1">
    <script language="javascript">
    function changeMain(link)
    {
    parent.mainFrame.location=link;  

    }
    </script>
    </head>
    <body bgColor="floralwhite">
    <a href="#" onclick="changeMain('webform1.aspx');">webform1</a><br>
    <a href="#" onclick="changeMain('webform2.aspx');">webform2</a><br>
    <a href="#" onclick="changeMain('webform2.aspx');">webform3</a><br>
    <a href="#" onclick="changeMain('webform3.aspx');">webform4</a><br>
    </body>
    </html>
      

  2.   

    试了一下parent.mainFrame.location=link;  这句话用不了,点不出来啊