You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
627 B
C#

using System;
using System.Collections;
using System.Collections.Specialized;
namespace BP.Pub
{
public class Current
{
static Current()
{
Session = new Hashtable();
}
public static Hashtable Session;
public static void SetSession(object key ,object Value)
{
if( Session.ContainsKey(key) )
{
Session.Remove( key );
}
Session.Add(key ,Value);
}
public static string GetSessionStr(object key, string isNullAsValue)
{
object val = Session[key];
if (val == null)
return isNullAsValue;
return val as string;
}
}
}