如何在子页面中使用框架 [英] How to use frames in child page

查看:63
本文介绍了如何在子页面中使用框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,
我正在尝试将asp.net应用程序从1.0迁移到4.0.
我遇到的问题,Use of frame

hello friends,
I''m trying to migrate the asp.net application from 1.0 to 4.0.
Problem I faced, Use of frame

<html>
  <head>
    <title>Project Estimation</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">
    <LINK href="Formatting\RevRec_stylesheet.css" type="text/css" rel="stylesheet">
	<script language="javascript" src="JavaScript/CommonJSFunctions.js"></script>
  </head>
  <frameset rows="44%,3.5%,*" border="0" frameSpacing="0" frameBorder="0"  önload="enableTabs();window.moveTo(0,0);window.resizeTo(screen.availWidth, screen.availHeight);">
		<frame id="frmrevrec" src="wf_ProjectEstimates.aspx" name="frmcnf" marginwidth="0" marginheight="0"
			scrolling="no" frameborder="no">
		<frame id="tabs" src="wf_PrjEstMenu.aspx" name="tabs" marginwidth="0" marginheight="0" scrolling="auto"
			frameborder="no" noresize>
		<frame id="tabsobj" src="" name="tabsobj" marginwidth="0" marginheight="0" scrolling="auto"
			frameborder="no" bordercolor="black" noresize>
	</frameset>
</html>



我将代码更改为母版页和子页,如下所示



I change the code to master and child page as below

<asp:Content ID="Content1" ContentPlaceHolderID="cphPage" runat="server">
      <asp:UpdatePanel ID="pnlUpdateMessage" runat="server" UpdateMode="Conditional">
        <contenttemplate>
            <table id="tblMessage" style="width: 100%">
                <tr>
                    <td>
                        <uc:ucmessage_ascx ID="ucMessage"  runat="server" />
                    </td>
                </tr>
            </table>
        </contenttemplate>
    </asp:UpdatePanel>
    <div>
        <frameset rows="44%,3,*" border="0" frameSpacing="0" frameBorder="0" 
               önload="enableTabs();window.moveTo(0,0);window.resizeTo(screen.availWidth, screen.availHeight);">
		    <frame id="frmrevrec" src="wf_ProjectEstimates.aspx" name="frmcnf" marginwidth="0" marginheight="0"
			    scrolling="no" frameborder="no">
		    <frame id="tabs" src="wf_PrjEstMenu.aspx" name="tabs" marginwidth="0" marginheight="0" scrolling="auto"
			    frameborder="no" noresize>
		    <frame id="tabsobj" src="" name="tabsobj" marginwidth="0" marginheight="0" scrolling="auto"
			    frameborder="no" bordercolor="black" noresize>
	    </frameset>
    </div>
</asp:Content>



问题是框​​架中的页面没有显示.
知道如何克服吗?
我应该使用IFrame还是有其他更好的选择??

在此先感谢



Problem is that the pages in the frame are not displayed.
Any idea how to overcome??
should i need to use IFrame or is thr any better option available??

thanks in advance

推荐答案

不建议使用frmaeset /frame etc.为什么不只使用一堆div的带伪帧?查看以下插件:

jQuery布局- http://layout.jquery-dev.net/demos.cfm [ http://layout.jquery-dev.net/demos/simple.html [ ^ ]

要加载每个部分中的数据,您可以使用
Using frmaeset / frame etc is not recommended. Why don''t you just use a bunch of div''s w/ pseudo frames ? Check out the following plugin :

jquery layout - http://layout.jquery-dev.net/demos.cfm[^]

and here is an example:

http://layout.jquery-dev.net/demos/simple.html[^]

To load the data in each section, you can use


.load( http://api.jquery.com/load-event/ [ ^ ]).

因此,从总体上讲,这是您必须要做的.

首先定义html:

.load (http://api.jquery.com/load-event/[^]).

So, in a high level, this is what you have to do.

First define the html:

<div>
   <div id="section1">
   </div>

   <div id="section2">
   </div>


   <div id="section3">
   </div>
</div>



然后使用jquery加载



Then use jquery to load


(函数(){


这篇关于如何在子页面中使用框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆