本帖最后由 thinclient 于 2012-04-14 07:44:41 编辑

解决方案 »

  1.   

    参考:
    http://blog.csdn.net/taomanman/article/details/5712959
      

  2.   

    你需要在点击事件跳转页面的同时,指定Target为ContentFrame你可以新建一个类using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;/// <summary>
    ///ResponseHelper 的摘要说明
    /// </summary>
    public static class ResponseHelper
    {
        public static void Redirect(string url, string target, string windowFeatures)
        {
            HttpContext context = HttpContext.Current;
            if ((String.IsNullOrEmpty(target) || target.Equals("_self", StringComparison.OrdinalIgnoreCase)) && String.IsNullOrEmpty(windowFeatures))
            {
                context.Response.Redirect(url);
            }
            else
            {
                Page page = (Page)context.Handler;
                if (page == null)
                {
                    throw new InvalidOperationException("Cannot redirect to new window outside Page context.");
                } 
                url = page.ResolveClientUrl(url); 
                string script;
                 if (!String.IsNullOrEmpty(windowFeatures))
                 { 
                       script = @"<script>window.open(""{0}"", ""{1}"", ""{2}"");</script>"; 
                 }
                else
                {
                    script = @"<script>window.open(""{0}"", ""{1}"");</script>";
                }
                script = String.Format(script, url, target, windowFeatures);
                page.RegisterStartupScript("", script);
            }
        }
    }然后<html>
    <frameset id="sidebar_content" cols="225, *" frameborder="1" border="6" framespacing="5" bordercolor="#A1C7F9">
      <frame name="NavigetionFrame" src="tree.aspx" frameborder="1" />
      <frame name="ContentFrame" src="TopicList.aspx"/>
    </frameset>
    </html>  protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
    {
         string url = "TopicList.aspx?Department="+TreeView1.SelectedNode.ValuePath;
         ResponseHelper.Redirect(url,"ContentFrame", "");
     }
      

  3.   

    vs中用的是iframe吧 frameset 这个在vs中不能用的吧
      

  4.   

    别用selectedNodeChanged事件
    treeNode.NavigateUrl="TopicList.aspx?Department=1"
    treeNode.Target = "ContentFrame"
      

  5.   

    你的回复解决了三帖没解决的问题:
    请到以下帖中回复加分好么
    http://topic.csdn.net/u/20120414/07/19da314a-25e5-4122-8762-816b1d244c7c.html
    http://topic.csdn.net/u/20120414/09/2a8c9765-47eb-4b5e-8220-a1e17c860a4e.html
    http://topic.csdn.net/u/20120414/11/b25a4b5f-906f-481b-a081-54895a6ae108.html
      

  6.   

    还有这个帖子也是:
    http://topic.csdn.net/u/20120413/21/8ee7c712-799c-46a0-b069-9305c59e3dee.html?seed=748636969&r=78245209#r_78245209