ASP.NET中iframe框架點擊左邊頁面鏈接 右邊顯示鏈接頁面內容
更新時間:2016年07月27日 11:06:05 作者:小白桃要去遠方
這篇文章主要介紹了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的過程中學習到的一個知識點,希望對大家有用。
您可能感興趣的文章:
- asp.net中MVC借助Iframe實現無刷新上傳文件實例
- asp.net在iframe中彈出信息并執(zhí)行跳轉問題探討
- ASP.NET頁面借助IFrame提交表單數據所遇到問題的解決方法分享
- asp.net 文件上傳與刷新與asp.net頁面與iframe之間的數據傳輸
- ASP.NET中使用IFRAME建立類Modal窗口
- asp.net省市三級聯動的DropDownList+Ajax的三種框架(aspnet/Jquery/ExtJs)示例
- asp.net 學習之路 項目整體框架簡單的搭建
- asp.net GridView中超鏈接的使用(帶參數)
- ASP.NET 鏈接 Access 數據庫路徑問題最終解決方案
- asp.net實現生成靜態(tài)頁并添加鏈接的方法
相關文章
asp.net treeview checkbox 相關問題
asp.net treeview checkbox 相關問題,需要的朋友可以看下。2009-06-06
Asp.Net Core利用xUnit進行主機級別的網絡集成測試詳解
這篇文章主要給大家介紹了關于Asp.Net Core利用xUnit進行主機級別的網絡集成測試的相關資料,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們來一起看看吧2018-12-12
ASP.NET?MVC遍歷驗證ModelState的錯誤信息
這篇文章介紹了ASP.NET?MVC遍歷ModelState錯誤信息的方法,文中通過示例代碼介紹的非常詳細。對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下2022-09-09

