发布于 2018-03-22 09:57:10 | 214 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

ASP.NET

ASP.NET 是.NET FrameWork的一部分,是一项微软公司的技术,是一种使嵌入网页中的脚本可由因特网服务器执行的服务器端脚本技术,它可以在通过HTTP请求文档时再在Web服务器上动态创建它们。 指 Active Server Pages(动态服务器页面) ,运行于 IIS(Internet Information Server 服务,是Windows开发的Web服务器)之中的程序 。


这篇文章主要介绍了ASP.NET中iframe框架点击左边页面链接,右边显示链接页面内容的实现代码,感兴趣的小伙伴们可以参考一下

 ASP.NET中iframe框架点击左边页面链接,右边则显示链接页面内容,具体实现内容如下

先看看效果图:

首先是主页面main.aspx


<body style="background-color: #AFEEEE">
 <form id="form1" runat="server">
 <div>
  <center>
   <h1>
    后台管理界面
   </h1>
    <span style="float: right;">
     <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 style="width: 180px;" 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的过程中学习到的一个知识点,希望对大家有用。



最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务