如何让TreeView1.SelectedNode.Text的值通过url传递更新首页框架中间的页面
首页
<!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>
<title></title>
<style type="text/css">
table
{
border-style: dashed;
border-width: 0px;
padding: 0px;
margin: 0px;
width:100%;
height:100%;
}
.header
{
width:100%;
height:10%;
}
.left
{
width:20%;
height:80%;
}
.right
{
width:70%;
height:80%;
}
</style>
</head>
<body>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td colspan="2" class="header">
<iframe name="frmHeader"
src="header.aspx"
title="系统信息" width="100%" align="top" scrolling="no" frameborder="0"
id="Iframe1"></iframe>
</td>
</tr>
<tr style="height:500px" valign="top">
<td class="left">
<iframe name="frmLeft" src="left.aspx" title="功能区" width="100%" align="top"
scrolling="no" frameborder="0" id="I1" height="500px"></iframe>
</td>
<td class="right">
<iframe name="frmRight" src="Default.aspx" title="内容区" width="100%" align="top" scrolling="no" height="500px" frameborder="0" id="frmLeft"></iframe>
</td>
</tr>
</table>
</body>
</html>
左页面
<!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>
<title></title>
<style type="text/css">
table
{
border-style: dashed;
border-width: 0px;
padding: 0px;
margin: 0px;
width:100%;
height:100%;
}
.header
{
width:100%;
height:10%;
}
.left
{
width:20%;
height:80%;
}
.right
{
width:70%;
height:80%;
}
</style>
</head>
<body>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td colspan="2" class="header">
<iframe name="frmHeader"
src="header.aspx"
title="系统信息" width="100%" align="top" scrolling="no" frameborder="0"
id="Iframe1"></iframe>
</td>
</tr>
<tr style="height:500px" valign="top">
<td class="left">
<iframe name="frmLeft" src="left.aspx" title="功能区" width="100%" align="top"
scrolling="no" frameborder="0" id="I1" height="500px"></iframe>
</td>
<td class="right">
<iframe name="frmRight" src="Default.aspx" title="内容区" width="100%" align="top" scrolling="no" height="500px" frameborder="0" id="frmLeft"></iframe>
</td>
</tr>
</table>
</body>
</html>
左页面.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;public partial class left : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
//组装执行URL传参的URL字符串 string url = string.Format("Default.aspx?TreeView1.SelectedNode.Text={0}",
this.TreeView1.SelectedNode.Text); //使用带有URL参数的URL执行页面跳转
this.Response.Redirect(url);
站点地图
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="" title="公安文件管理系统" description="">
<siteMapNode url="Login.aspx" title="登陆" description="用户登陆、注销" />
<siteMapNode url="" title="讲话类文件" description="讲话类文件" >
<siteMapNode url="" title="部局领导讲话" description="部局领导讲话" />
<siteMapNode url="" title="公安局领导讲话" description="公安局领导讲话" />
<siteMapNode url="" title="公安处领导讲话" description="公安处领导讲话" />
</siteMapNode>
<siteMapNode url="" title="规范性文件类" description="规范性文件类" >
<siteMapNode url="" title="上级文件" description="上级文件" />
<siteMapNode url="" title="本处文件" description="本处文件" />
</siteMapNode>
<siteMapNode url="" title="经验材料文件类" description="经验材料文件类" >
<siteMapNode url="" title="外局经验材料" description="外局经验材料" />
<siteMapNode url="" title="本处经验材料" description="本处经验材料" />
</siteMapNode>
<siteMapNode url="" title="汇报材料文件类" description="汇报材料文件类" >
<siteMapNode url="" title="述职报告" description="述职报告" />
<siteMapNode url="" title="杂项汇报" description="杂项汇报" />
</siteMapNode>
</siteMapNode>
</siteMap>
首页
<!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>
<title></title>
<style type="text/css">
table
{
border-style: dashed;
border-width: 0px;
padding: 0px;
margin: 0px;
width:100%;
height:100%;
}
.header
{
width:100%;
height:10%;
}
.left
{
width:20%;
height:80%;
}
.right
{
width:70%;
height:80%;
}
</style>
</head>
<body>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td colspan="2" class="header">
<iframe name="frmHeader"
src="header.aspx"
title="系统信息" width="100%" align="top" scrolling="no" frameborder="0"
id="Iframe1"></iframe>
</td>
</tr>
<tr style="height:500px" valign="top">
<td class="left">
<iframe name="frmLeft" src="left.aspx" title="功能区" width="100%" align="top"
scrolling="no" frameborder="0" id="I1" height="500px"></iframe>
</td>
<td class="right">
<iframe name="frmRight" src="Default.aspx" title="内容区" width="100%" align="top" scrolling="no" height="500px" frameborder="0" id="frmLeft"></iframe>
</td>
</tr>
</table>
</body>
</html>
左页面
<!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>
<title></title>
<style type="text/css">
table
{
border-style: dashed;
border-width: 0px;
padding: 0px;
margin: 0px;
width:100%;
height:100%;
}
.header
{
width:100%;
height:10%;
}
.left
{
width:20%;
height:80%;
}
.right
{
width:70%;
height:80%;
}
</style>
</head>
<body>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td colspan="2" class="header">
<iframe name="frmHeader"
src="header.aspx"
title="系统信息" width="100%" align="top" scrolling="no" frameborder="0"
id="Iframe1"></iframe>
</td>
</tr>
<tr style="height:500px" valign="top">
<td class="left">
<iframe name="frmLeft" src="left.aspx" title="功能区" width="100%" align="top"
scrolling="no" frameborder="0" id="I1" height="500px"></iframe>
</td>
<td class="right">
<iframe name="frmRight" src="Default.aspx" title="内容区" width="100%" align="top" scrolling="no" height="500px" frameborder="0" id="frmLeft"></iframe>
</td>
</tr>
</table>
</body>
</html>
左页面.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;public partial class left : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
//组装执行URL传参的URL字符串 string url = string.Format("Default.aspx?TreeView1.SelectedNode.Text={0}",
this.TreeView1.SelectedNode.Text); //使用带有URL参数的URL执行页面跳转
this.Response.Redirect(url);
站点地图
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="" title="公安文件管理系统" description="">
<siteMapNode url="Login.aspx" title="登陆" description="用户登陆、注销" />
<siteMapNode url="" title="讲话类文件" description="讲话类文件" >
<siteMapNode url="" title="部局领导讲话" description="部局领导讲话" />
<siteMapNode url="" title="公安局领导讲话" description="公安局领导讲话" />
<siteMapNode url="" title="公安处领导讲话" description="公安处领导讲话" />
</siteMapNode>
<siteMapNode url="" title="规范性文件类" description="规范性文件类" >
<siteMapNode url="" title="上级文件" description="上级文件" />
<siteMapNode url="" title="本处文件" description="本处文件" />
</siteMapNode>
<siteMapNode url="" title="经验材料文件类" description="经验材料文件类" >
<siteMapNode url="" title="外局经验材料" description="外局经验材料" />
<siteMapNode url="" title="本处经验材料" description="本处经验材料" />
</siteMapNode>
<siteMapNode url="" title="汇报材料文件类" description="汇报材料文件类" >
<siteMapNode url="" title="述职报告" description="述职报告" />
<siteMapNode url="" title="杂项汇报" description="杂项汇报" />
</siteMapNode>
</siteMapNode>
</siteMap>
解决方案 »
- 页面传值一个简单的问题!
- 怎样利用ASP.NET C# 统计所选中项的总金额
- .net mvc中的一个control走了2遍会是什么原因造成的?
- ASP.NET的几个基础试题 已经做完了帮我看看对不对 谢谢了
- 新人又遇到问题。请指教。
- 自定义排序问题
- 怎么让一台服务器只能让一个客户端登录呢,最好是限制某一台客户端,别人登录都不行?还在,服务器同一时刻只有一台客户端电脑可以和它保
- 求:用ASP.NET编程基于浏览器的软件生成及导入模板
- 求助,创建控件时出错HRESULT E_FAIL
- 如何關閉excel?
- 毕设题目:基于ASP.NET的投票评价系统,谁有具体资料,求分享~
- 菜鸟求解答! ASP中在当前页面获取前一个页面里控件的值
改成
Page.ClientScript.RegisterStartupScript(Page.GetType(),"js","parent.frames['frmRight'].location.href='" + url + "'",true)
target指向中间区的名称。