現在有一個靜態html文件:
<html> 
<head> 
<title>分帧页面</title> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
</head> 
<frameset rows="18%,*" frameborder=no>  
<frame name="topFrame" scrolling="NO" noresize src="top.aspx" > 
<frame name="MainFrame" noresize src="Main.aspx"> 
</frameset> 
<noframes> 
<body> 
<p>很抱歉!这是一个分帧页面,但由于你的浏览器不支持,所以不能浏览! </p> 
<p>Sorry!This page uses frames,but your browser doesn't support them. </p>
</body>
</noframes> 
</html> 請問如何改為ASPX文件?是不是一定要用母版頁呢?有沒有比較簡單的辦法?要求要有代碼分離文件。

解决方案 »

  1.   

    你直接把文件名后缀改为.aspx就行了啊。有什么问题吗?
    比如:
    main.aspx<script type="text/javascript" >
    //<!--
        this.onunload = function()
        {
            clearSession("SessionOutPage.aspx?type=ClearSession");
        }
        function clearSession(fileurl)
        {
            if(fileurl.indexOf("?") > 0)
            {
                fileurl += "&random="+Math.random();
            }
            else
            {
                fileurl += "?random="+Math.random();
            }
            var obj = false; 
            try
            {
                obj = new ActiveXObject( "Microsoft.XMLHTTP");
            }
            catch(e)
            {
                try
                {
                    obj = new ActiveXObject( "Msxml2.XMLHTTP");
                }
                catch(e2)
                {
                    obj = false;
                }
            }
            obj.open("GET",fileurl,false);
            obj.send(null);
        }
        //-->
    </script>
    </head>
    <frameset rows="39,*" >
    <frame src="G0021_01_TopMenu.aspx" frameborder="0" scrolling="No" noresize="noresize" style="border-bottom: thin hidden;" />
    <frameset name=mainframe id=mainframe  rows="*" cols="200,18,*" >
    <frame name="tree" src="MenuTab.aspx" frameborder="0" id="tree" style="border-right:hidden"  noresize/>

    <frame name="divline" src="Divline.aspx"  frameborder="0" id="divline"  noresize/>

    <frame name="active" src="G0021_03_ProjectView.aspx" frameborder="0" id="active" />
    </frameset>
    </frameset>
    <body >
        <form id="form1" runat="server">
        </form>
    </body>
    </html>
      

  2.   

    把推展名改了就成ASPX文件了嘛
      

  3.   

    设计不了,你要用aspx你就得遵循原则,要不你就用dreamwear设计
    还是比较任何html的设计,用dreamwear设计出来的东西,不好用
      

  4.   

    不清楚LZ的意思
    html框架集在.net里面一样可以用的如果是用 嵌套页面, 就如LS所说的
      

  5.   

    直接新建个ASPX文件,然后把你的html代码copy进去就行了啊。ASPX文件中的代码和HTML代码是一样的。
      

  6.   

    直接新建个ASPX文件,然后把你的html代码copy进去就行了啊。BearRui(孤熊 | 带你去看海!) 说的对:
        其实没有什么非常大的区别,也是用src去应用html.aspx页面都可以啊,代码分离文件自然是跟着aspx页面的啊,你的<iframe>里面只不过是去应用拉而已,我对lz的代码分离是这样看的,lz如果觉得大家说的不对,就把的你意思表达更清楚些吧,这里很多大侠的,不怕解决不了.
      

  7.   

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="CrystalFrame.aspx.cs" Inherits="CrystalFrame" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server"> 
    <title>分帧页面</title> 
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
    </head> 
    <frameset rows="18%,*" frameborder=no>  
    <frame name="topFrame" scrolling="NO" noresize src="top.aspx" > 
    <frame name="MainFrame" noresize src="Main.aspx"> 
    </frameset> 
    <noframes> 
    <body> 
        <form id="form1" runat="server">
        <div>
        <p>很抱歉!这是一个分帧页面,但由于你的浏览器不支持,所以不能浏览! </p> 
        <p>Sorry!This page uses frames,but your browser doesn't support them. </p>
        </div>
        </form>
    </body>
    </noframes> 
    </html>應該就是這樣。