在框架页面中,想点击左边页面中的按钮链接到右边页面,同时还能触发事件,比如,点击按钮后进行处理,根据相应的处理跳转到其它页面,target=right,如果使用Response.Redirect("aa.aspx")的话,定位的页面就会在本页面中显示,不会显示在右边框架中,应该怎么解决啊!
谢谢

解决方案 »

  1.   

    这个是框架代码:
    <HTML>
    <HEAD>
    <TITLE>UpdateTree</TITLE>
    <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
    <meta content="C#" name="CODE_LANGUAGE">
    <meta content="JavaScript" name="vs_defaultClientScript">
    <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
    </HEAD>
    <FRAMESET id="fsTop" border="0" frameSpacing="0" rows="20,*" frameBorder="0" cols="*" topmargin="0"
    leftmargin="0" marginheight="0" marginwidth="0">
    <FRAME border="0" name="title" marginWidth="0" borderColor="#e4e4e4" marginHeight="0" src="top.aspx?id=-1"
    frameBorder="no" noResize scrolling="no" topmargin="0" leftmargin="0">
    <FRAMESET border="1" name="search" frameSpacing="0" frameBorder="1" cols="200,*" topmargin="0"
    leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0">
    <FRAME style="BORDER-TOP: #000000 1px solid" border="0" name="contents" marginWidth="0"
    borderColor="#e4e4e4" marginHeight="0" src="left.aspx" frameBorder="0" noResize scrolling="no"
    topmargin="0" leftmargin="0" target="main">
    <FRAME id="main" style="BORDER-TOP: #000000 1px solid; BORDER-LEFT: #ffffff 2px groove"
    border="2" name="main" marginWidth="0" borderColor="#e4e4e4" marginHeight="0" src="center.aspx"
    frameBorder="no" scrolling="auto">
    </FRAMESET>
    </FRAMESET>
    </HTML>按钮代码:
    Response.Write("<script language=javascript>window.parent.contents.location.href='right.aspx';</script>");//刷新左边的框架(contents是框架的名称)
    Response.Write ("<script language=javascript>parent.main.location.href='center.aspx';</script>");>");//刷新本页的框架(main是框架的名称)
      

  2.   

    给你个全的
    using System;
    using System.ComponentModel;
    using System.Collections;
    using System.Diagnostics;
    using System.Data;
    using System.Data.SqlClient;
    using System.Configuration;namespace nmhz.components
    {
    /// <summary>
    /// Dbconnection 的摘要说明。
    /// </summary>
    public class Dbconnection
    {
    // 连接数据源
    public SqlConnection con;
    public Dbconnection()
    {
    //
    // TODO: 在此处添加构造函数逻辑
    //
    }
    /// <summary>
    /// 打开数据库连接.
    /// </summary>
    public void Open() 
    {
    // 打开数据库连接
    if (con == null) 
    {
    con = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
    }
    if(con.State ==System.Data.ConnectionState.Closed)
    con.Open(); } /// <summary>
    /// 关闭数据库连接
    /// </summary>
    public void Close() 
    {
    if (con != null)
    con.Close();
    } /// <summary>
    /// 释放资源
    /// </summary>
    public void Dispose() 
    {
    // 确认连接是否已经关闭
    if (con != null) 
    {
    con.Dispose();
    con = null;
    }
    }
    }
    }
      

  3.   

    Response.Write("window.location.href='');
      

  4.   

    不知道楼主要触发什么事件,如果是判断事件的话
    楼主可以在客户端用target来跳转页面
    事件可以在跳转后的页面的page_load中写