搞定!给我分!System.Web.HttpContext.Current.Response.Redirect("Url");

解决方案 »

  1.   

    System.Diagnostics.Process.Start("http://www.yahoo.com");
      

  2.   

    System.Web.HttpContext.Current.Response.Redirect("Url");是正选,System.Diagnostics.Process.Start("http://www.yahoo.com");启动了在iis中启动了一个线程,不是一个好方法
      

  3.   

    System.Web.HttpContext 用上下文private string GetConnectionString()
    {

    String pwd="User Id="+m_User+";Password="+m_Pwd+";";
    HttpContext context = HttpContext.Current;
    string connectionString = (string)context.Cache["ConnectionString"];
    if (connectionString== null)
    {
    connectionString=ConfigurationSettings.AppSettings["ConnectionString"]  + pwd;
    context.Cache["ConnectionString"] = connectionString;
    }
    return connectionString;
    }
      

  4.   

    System.Web.HttpContext.Current.Response.Redirect("Url");
    可以,但是导致当前页面跳转到该页面,如果我希望像js那样window.open()到另外一个页面上如何实现呢?
    System.Diagnostics.Process.Start("http://www.yahoo.com");
    提示错误:
    System.ComponentModel.Win32Exception: 系统找不到指定的文件。