Hi,
Well you could use alsorts of databases. You can use a text file if you want. Some code for this could be as follows:
 
pass.txt
user|pass
rob|pass
test|pass
 
Class.cs
using System.IO;
 
StreamReader reader = new StreamReader("pass.txt");
string tmp = reader.ReadLine();
while (tmp !=null)
{
string[] tmp2 = tmp.Split(new char[] {'|'}));
if (tmp2[0]==username && tmp[1]==password)
{
//aqccess granted
 break;
}
 
}

�amem H� <[EMAIL PROTECTED]> wrote:


yep, this is wat i mean
but do we need to use the database to store the username and password?

--- In [email protected], "Rob Heeley"
<[EMAIL PROTECTED]> wrote:
> What do you mean?
>

>
> If (tbUsername.Text==username && tbPassword.Text==password)
>
> {
>
>             LoggedIn();

break;
>
> }
>
> Else
>
> {
>
>             AccessDenied();
>
> }
>

>
>   _____ 
>
> From: ?amem H? [mailto:[EMAIL PROTECTED]
> Sent: 23 January 2005 14:47
> To: [email protected]
> Subject: [Microsofts_C_Sharp] login form
>

>
>
> hi
>
> can anyone help me on how to do a login windows form using C# codes?
>
> thanks
>
>
>
>
>
>
>   _____ 
>
> Yahoo! Groups Links
>
> *      To visit your group on the web, go to:
> http://groups.yahoo.com/group/Microsofts_C_Sharp/
>  
> *      To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]
subject=Unsubscribe>
>  
> *      Your use of Yahoo! Groups is subject to the Yahoo!
> <http://docs.yahoo.com/info/terms/>  Terms of Service.




ALL-NEW Yahoo! Messenger - all new features - even more fun!

Yahoo! Groups Links

Reply via email to