セッションの設定


 asp.net web      
    /// <summary>
    ///   Session
    /// </summary>
    /// <param name="name"></param>
    /// <returns></returns>
    [WebMethod(EnableSession = true)]
    public static bool setSession(string name)
    {
        HttpContext.Current.Session["name"] = System.Web.HttpUtility.UrlDecode(name);
        return true;
    }

    /// <summary>
    ///   session
    /// </summary>
    /// <returns></returns>
    [WebMethod(EnableSession = true)]
    public static string getSession()
    {
        return HttpContext.Current.Session["name"].ToString();
    }