62,046
社区成员
发帖
与我相关
我的任务
分享
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
<!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 runat="server">
<title>无标题页</title>
</head>
<script type="text/javascript">
function NowShow(Url) {
window.parent.document.getElementById("Main").src=Url;
}
</script>
<body>
<form id="form1" runat="server">
<asp:TreeView ID="TreeView1" runat="server">
<Nodes>
<asp:TreeNode NavigateUrl="javascript:NowShow('http://www.baidu.com')" Text="百度" Value="百度"></asp:TreeNode>
<asp:TreeNode NavigateUrl="javascript:NowShow('http://www.163.com')" Text="163" Value="百度"></asp:TreeNode>
<asp:TreeNode NavigateUrl="javascript:NowShow('http://www.QQ.com')" Text="QQ" Value="百度"></asp:TreeNode>
<asp:TreeNode NavigateUrl="javascript:NowShow('http://www.csdn.net/')" Text="Csdn" Value="百度"></asp:TreeNode>
</Nodes>
</asp:TreeView>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
<!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 runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<iframe src=Default.aspx width=200 height=500></iframe>
<iframe id="Main" width=500 height=500>
</iframe>
</form>
</body>
</html>
TreeNode node=new TreeNode ();
node.NavigateUrl="javascript:NowShow('http://www.baidu.com')";
node.Text="百度";
node.Value="百度";