首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

ASP.NET中怎么添加"框架"呀,新手想学习实在在难了!

2012-01-11 
ASP.NET中如何添加框架?请教高手呀,新手想学习实在在难了!!!!!想实现 上,左,右 的框架格式,我想做的是

ASP.NET中如何添加"框架"?请教高手呀,新手想学习实在在难了!!!!!
想实现 "上,左,右 "的框架格式,我想做的是框架----上面内容添加的文本文字,左面内容是用代码写的树结构, "树结构 "已经写好.右面内容是页面.希望点击左面树的不同结点的内容,右面出现相应的页面,谢谢你们了!!!!

[解决办法]
<html>

<head>
<title> System </title>
</head>

<frameset framespacing= "0 " border= "1 " rows= "90,*,28 " frameborder= "1 ">
<frame name= "top " scrolling= "no " noresize target= "contents " src= "./home/top.aspx " frameBorder=no borderColor=#C0C0C0 border=0>
<frameset cols= "140,* " frameSpacing=3 frameBorder=1 border=1 >
<frame name= "contents " target= "main " src= "./home/left.aspx " scrolling= "auto " frameborder= "no " marginWidth=0 marginHeight=0 border=1 LEFTMARGIN= "0 " TOPMARGIN= "0 ">
<frame name= "main " src= "default.aspx " scrolling= "auto " frameBorder=no borderColor=#C0C0C0 border=0>
</frameset>
<frame name= "bottom " frameborder= "no " scrolling= "no " noresize target= "contents " src= "./home/foot.aspx " >
<noframes>
<body topmargin= "0 " leftmargin= "0 ">

<

</body>
</noframes>
</frameset>

</html>

[解决办法]
<frameset rows= "60,90% " frameborder= "NO " border= "0 " framespacing= "0 ">
<frame src= "top.html " name= "topFrame " scrolling= "no " frameborder= "0 ">
<frameset cols= "300,68% " frameborder= "0 " ID= "mainFrameSet " border= "0 " spacing= "0 ">
<frame src= "left.aspx " name= "leftFrame " scrolling= "auto ">
<frame src= "right.aspx " name= "mainFrame " scrolling= "auto " frameborder= "0 ">
</frameset>
</frameset>
[解决办法]
我建议你用iframe,比较简单,你可以在一个页面上,2*2的表格,上面的两个表格合并单元格
,下面左边的表格,添加treeview空间,右边的表格,放一个iframe
例如:
<%@ Page Language= "C# " AutoEventWireup= "true " CodeFile= "cover.aspx.cs " Inherits= "cover " %>


<!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 id= "Head1 " runat= "server ">
<title> 无标题页 </title>
</head>
<body style= "text-align: center ">
<%
Response.Buffer=true;
Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);
Response.Expires=0;
Response.CacheControl = "no-cache ";
%>
<form id= "form1 " runat= "server ">
<table style= "width: 778px; height: 106px ">
<tr>
<td style= "width: 778px; height: 106px ">
<asp:Image ID= "Image1 " runat= "server " ImageUrl= "~/pic/bar.png " /> </td>
</tr>
<tr>
<td style= "background-image: url(pic/bg03.gif); width: 100px; background-repeat: repeat-x;


height: 1px ">
</td>
</tr>
</table>
<table style= "width: 774px; height: 550px ">
<tr>
<td style= "width: 130px; text-align: left; ">
<asp:TreeView ID= "TreeView1 " runat= "server " Height= "550px " Width= "130px " CollapseImageUrl= "~/pic/closed.jpg " ExpandImageUrl= "~/pic/open.jpg " Font-Size= "Small ">
<Nodes>

</Nodes>
<LeafNodeStyle ImageUrl= "~/pic/TT.GIF " />
<HoverNodeStyle BackColor= "White " BorderColor= "White " />
</asp:TreeView>
</td>
<td style= "width: 1px;background-image: url(pic/bg02.GIF); background-repeat: repeat-y; ">
</td>
<td style= "width: 626px ">
<iframe name= "viewframe " height= "550 " width= "640 " frameborder= "0 " src= "welcome.htm "> </iframe>
</td>
</tr>
</table>
&nbsp;


</form>
</body>
</html>

参考一下

热点排行