asp.net事件问题

jxw3000 2004-04-06 12:16:57
用框架窗口,左边是a.aspx右边是b.aspx。其中a.aspx中有个树型控件,当点击
树型控件中一项时,右边变为c.aspx。但a.aspx页面重载,树型控件恢复到初始
状态。有没有办法使右边变为c.aspx的同时a.aspx页面不重载,
请各位帮帮我,在线等。。。。。。。。
...全文
52 15 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
pycys001 2004-04-06
  • 打赏
  • 举报
回复
或许你需要在 Page_Load 加上
if(!Page.IsPostBack)
pycys001 2004-04-06
  • 打赏
  • 举报
回复
<HEAD>
<base target="main">
</HEAD>

我的在tree页面加上<base target="main"> ,没有出现过你说的现象
jxw3000 2004-04-06
  • 打赏
  • 举报
回复
不是,就算是一个asp:button只要响应事迹都会刷新页面的
91619600 2004-04-06
  • 打赏
  • 举报
回复
检查一下你的链接时的target属性是不是设置错误了?因为我也用过框架,点击左边的treeview,把设置target=(右边框架页面的框架名称,一般为main或者right),并不会刷新页面。
jxw3000 2004-04-06
  • 打赏
  • 举报
回复
重复:和是不是TreeView没关系,我用PanelBar也是这个问题。我需要在它的单击事件中
处理,而这样有引发了页面重载。就好比我应asp:button的OnClick()处理程序而页面
不重载。希望高手赐教
TCat 2004-04-06
  • 打赏
  • 举报
回复
<html>
<head>
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<title>AMSSY网站维护系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="./stytle.css">
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" text="#000000">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr valign="top">
<td colspan="3" id="topbox" height="78"><iframe id="top" name="top" width="100%" height="100%" marginwidth="0" marginheight="0" scrolling="no" frameborder="no" src="top.htm"></iframe>
</td>
</tr>
<tr>
<td valign="top" id="leftbox" width="150" height="500"><iframe id="left" name="left" width="100%" height="100%" marginwidth="0" marginheight="0" scrolling="no" frameborder="no" src="left.htm"></iframe>
</td>
<td vAlign="top" align="left" width="7" style="FONT-SIZE: 1px">
<img src="./images/corner2.gif">
</td>
<td valign="top" id="mainbox" ><iframe id="main" name="main" width="100%" height="100%" marginwidth="0" marginheight="0" scrolling="no" frameborder="no" src="Logon.aspx"></iframe>
</td>
</tr>
</table>
</body>
</html>
shooper 2004-04-06
  • 打赏
  • 举报
回复
AutoPostBack=false
jxw3000 2004-04-06
  • 打赏
  • 举报
回复
不是TreeView的问提,是a.aspx重载造成的,必须保证a.aspx响应事件但页面不重载,
有没有人知道啊
xuexplorer 2004-04-06
  • 打赏
  • 举报
回复
TreeView.AutoPostBack=false;
bitsbird 2004-04-06
  • 打赏
  • 举报
回复
http://www.csdn.net/Develop/read_article.asp?id=22100
zhaozhongju 2004-04-06
  • 打赏
  • 举报
回复
用iframe来实现
推荐http://218.56.11.178:8018/去看看
jxw3000 2004-04-06
  • 打赏
  • 举报
回复
我用的是PanelBar,初始化全在C#后台代码中
ztx998 2004-04-06
  • 打赏
  • 举报
回复
把你的生成树的代码贴出来看看

以前还真没遇到过这样的问题,顺便学习一下
jxw3000 2004-04-06
  • 打赏
  • 举报
回复
说TreeView我只是举个例子,其核心问题是怎样使web控件的事件不刷新页面
侯教
vickyyu 2004-04-06
  • 打赏
  • 举报
回复
你只刷新右面页面就可以了
左边接点单击事件
Response.Write("<Script language = javascript>window.parent.frames(/frmRight').location='bb.aspx';</script>");

62,243

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧