Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / October 2004

Tip: Looking for answers? Try searching our database.

Logic Help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joanne - 16 Oct 2004 11:51 GMT
I need some help with  user names and passwords (five users and one password
for each user).  I have two txtboxes (txtName, txtPassword).  If a user
clicks enter and both are empty then a message is displayed, "enter user
name."  If just the name is entered the message "enter password."  If wrong
name and right password then message "re-enter name."  If right name and
wrong password message "valid name, wrong password."  I cant figure this out,
can someone help me please?  The names are tied to a passwords, for example a
user might have 123 for a name and a password of 456
Bob Powell [MVP] - 16 Oct 2004 12:02 GMT
The 'logic' here should be that each person should know his or her password
and no-other. If the name-password combination is wrong don't give the users
"mastermind" type clues about which bit was good and bad..

If the combination is bad, just say "username or password incorrect"

Signature

Bob Powell [MVP]
Visual C#, System.Drawing

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml

> I need some help with  user names and passwords (five users and one password
> for each user).  I have two txtboxes (txtName, txtPassword).  If a user
[quoted text clipped - 4 lines]
> can someone help me please?  The names are tied to a passwords, for example a
> user might have 123 for a name and a password of 456
Morten Wennevik - 16 Oct 2004 12:13 GMT
Hi Joanne,

Although it might be user friendly to tell the user if it was the name or  
the password is incorrect it isn't very secure and it is not adviced.

If you don't need a secure setup you could easily check if the password is  
correct for a given user (depending on how you store usernames/passwords),  
but for unknown username you would need to check each password in turn.  
Bear in mind that if the user is allowed to set his/her own password you  
might end up with two users having the same password, although it looks  
like you are specifying the passwords yourself.

It is easy enough to manage, but how to do it depends on how you  
store/lookup usernames/passwords.

Signature

Happy Coding!
Morten Wennevik [C# MVP]

Bishoy Ghaly - 16 Oct 2004 13:51 GMT
The Logic is like this:

   if username correct then
       if password correct then
           successfull login
           exit
       else
           wrong password
       end if
   else
       wrong username
   end if

>I need some help with  user names and passwords (five users and one
>password
[quoted text clipped - 8 lines]
> example a
> user might have 123 for a name and a password of 456

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.