这篇文章将为大家详细讲解有关ASP.NET中iframe框架点击左边页面链接与右边显示链接页面内容的示例分析,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。
先看看效果图:
首先是主页面main.aspx
<body >
<form id="form1" runat="server">
<div>
<center>
<h2>
后台管理界面
</h2>
<span >
<asp:HyperLink ID="HyperLink1" runat="server" Style="text-align: center" NavigateUrl="Default.aspx">返回首页</asp:HyperLink></span>
<table border="0" width="1180px" cellpadding="0" class="main-table">
<tr>
<td align="center">
<iframe id="Left" name="Left" src="Left.aspx" class="inset-table" width="188px" height="730"
align="middle"></iframe>
</td>
<td align="left">
<iframe id="Right" name="Right" src="AddNews.aspx" class="outset-table" width="950"
height="730" align="middle"></iframe>
</td>
</tr>
</table>
</center>
</div>
</form>
</body>
然后是左边页面Left.aspx
<form id="form1" runat="server">
<div>
<table cellspacing="0" cellpadding="0">
<tr>
<td class="style1 ">
<div class="titleSystemName">
导航栏</div>
</td>
</tr>
<tr>
<td>
<asp:TreeView ID="TreeView1" runat="server" ImageSet="XPFileExplorer" NodeIndent="15"
Width="155px">
<ParentNodeStyle Font-Bold="False" />
<HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
<SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" HorizontalPadding="0px"
VerticalPadding="0px" />
<Nodes>
<asp:TreeNode Text="新闻类别1" Value="新闻类别1">
<asp:TreeNode NavigateUrl="~/AddNews.aspx?id=2" Target="Right" Text="添加新闻" Value="添加新闻">
</asp:TreeNode>
<asp:TreeNode NavigateUrl="~/ManagerNew.aspx?id=3" Target="Right" Text="删除/编辑新闻" Value="删除/编辑新闻">
</asp:TreeNode>
<%-- <asp:TreeNode NavigateUrl="~/UpdataNew.aspx?id=2" Target="Right" Text="更新新闻" Value="更新新闻">
</asp:TreeNode>--%>
</asp:TreeNode>
<asp:TreeNode Text="用户管理" Value="用户管理">
<asp:TreeNode NavigateUrl="~/UserManager.aspx" Target="Right" Text="管理用户" Value="管理用户">
</asp:TreeNode>
</asp:TreeNode>
</Nodes>
<NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="2px"
NodeSpacing="0px" VerticalPadding="2px" />
</asp:TreeView>
</td>
</tr>
</table>
</div>
</form>
最后是右边的页面AddNews.aspx,这个页面就可以插入自己需要的页面链接了。
关于ASP.NET中iframe框架点击左边页面链接与右边显示链接页面内容的示例分析就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。