Solved

c# user access login detail storing

Posted on 2013-01-18
3
252 Views
Last Modified: 2013-01-23
Hi

I am developing an application with an MDI form, and the first thing the user does is login, so a login form is the first thing they see.

I have created a login script, which checks the database and returns true/false of the details are correct.  Now, I need to store the login details somewhere that is accessible from all forms in the application (on a website I would store them in a session variable) what is the way to do this in c#?

Cheers

CD
0
Comment
Question by:cycledude
  • 2
3 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 38792352
A singleton class is probably what you are looking for.

http://en.wikipedia.org/wiki/Singleton_pattern
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
ID: 38792354
Also this for some implementations:
http://csharpindepth.com/Articles/General/Singleton.aspx
0
 

Author Closing Comment

by:cycledude
ID: 38811634
thanks andy
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Article by: Ivo
Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now