2011-11-18 34 views

回答

3

它沒有框架問題。 IE 6用於啓動新的會話,但在以後的版本中,你在文件菜單中明確選擇在新的會話

1
public static string TheSessionId() { 
    HttpSessionState ss = HttpContext.Current.Session; 
    HttpContext.Current.Session["test"] = "test"; 
    HttpContext.Current.Response.Write(ss.SessionID); 
    return "ok"; 
} 

打開新窗口嘗試上述的小功能,看看你得到2個不同的會話ID。如果是這樣,你只需要使用第一行,這樣你就可以得到你的會話ID。