I am using .net Windows Forms i need to maintain some date to check the condition. so i have to maintain it up to user logged out?
like session in ASP.NET
how can i do this? (note it should not expires until the user logged out)
I am using .net Windows Forms i need to maintain some date to check the condition. so i have to maintain it up to user logged out?
like session in ASP.NET
how can i do this? (note it should not expires until the user logged out)
You can use session also in winforms apps, but I don't think this is the correct way to do it. Can you more details ?
class Program
{
internal static Dictionary<string, object> GlobalVariables = new Dictionary<string, object>();
static void Main(string[] args)
{
...
}
}
I create Namespace like this
namespace nsGlobalData {
class GlobalData
{ public static int GlobalOrgId; }
}
To Set:
GlobalData.GlobalOrgId = Convert.ToInt16(ds.Tables[1].Rows[0].ItemArray[0]);
ToGet
txtnamt.text=GlobalData.GlobalOrgId;