记录一个静态类的静态属性

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Security;

/// <summary>
/// LanType 的摘要说明
/// </summary>
public class LanType
{
    private static string currLanType;
    public static string CurrLanType
    {
        get
        {
            return currLanType;
        }
        set
        {
            currLanType = value;
        }
    }
    static LanType()
	{
        FormsIdentity id = (FormsIdentity)HttpContext.Current.User.Identity;
        currLanType = id.Ticket.UserData;
    }
}

访问:LanType.CurrLanType

posted on 2012-06-06 16:01  静以修身俭以养德  阅读(198)  评论(0编辑  收藏  举报

导航