简体   繁体   中英

session gives null value with process.start() in asp.net ? why

i have stored value in session and start a process to navigate to another page cookies are disabled

here is a code to store session and process

    HttpContext.Current.Session["url"] = url;

   System.Diagnostics.Process.Start("http://localhost:50660/SearcResult.aspx");

in another page i have to get session stored value because with response redirect i am facing popup problem so here in page load of new form that is SearchResult.aspx

  protected void Page_Load(object sender, EventArgs e)
    {
        //string session = Convert.ToString(Session["url"]);
        //if (session != "")
        //{
            string link = Convert.ToString(Session["url"]);
            frame.InnerHtml = (" <iframe class='ifr' src='" + link + "' > </iframe>");
        //}
        //else {

        //    Response.Redirect("Default.aspx");



        //}
    }

but the session value is NULL

need help i want to navigate to another page with session have url with out facing popup problem

您应该使用Response.Redirect而不是process

Response.Redirect("http://localhost:50660/SearcResult.aspx");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM