Example #1
0
        public static void SetValue(string Key, T Value)
        {
            Key = "OBJ_" + Key;

            try
            {
                MemoryStream stream = new MemoryStream();
                //BinaryFormatter format = new BinaryFormatter();
                XmlSerializer format = new XmlSerializer(typeof(T));
                format.Serialize(stream, Value);
                string s = Convert.ToBase64String(stream.ToArray());
                stream.Close();

                Cookies.SetValue(Key, s, true);
            }
            catch { }
        }
Example #2
0
 private static void SetLogin(int user_id)
 {
     Cookies.SetValue("CP.UserID", user_id.ToString(), Setting.Mod_CPTimeout, true);
 }
Example #3
0
 public static void SetLogin(int webUserID, bool savepass)
 {
     Cookies.SetValue("Web.Login", webUserID.ToString(), savepass ? 0 : 120, true);
 }