Wrox Programmer Forums
|
BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4
This is the forum to discuss the Wrox book Beginning Microsoft Visual C# 2008 by Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, Eric White; ISBN: 9780470191354
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 3rd, 2009, 07:55 PM
Registered User
 
Join Date: Apr 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default username and password in forms

i am almost finished reading chapter 16 in this book and it is really helping me understand forms. But there is something that i want to add to maybe the simple editor example in chapter 17 example or one of the other form examples.

What i would like to add is a username and password field. I would also like to have the ability to create new user's and only if there is a valid use could they use the tools in the form.

What i have tried so far is putting in two text boxes called usernameTextBox and passwordTextBox. I also placed in two buttons one is login and the other is create new user. The login takes the text from the two boxes so that would be:
usernameTextBox.Text
and
passwordTextBox.Text
both of those are assigned to strings
i also added a .txt file to the project so i can place in the usernames and passwords. In the text file i separate the name and pass with a ";". I then have a global bool called validUser. It is set to true if the login was successful.

My success so far has been that after i place in one user and pass (not through create new user, but by editing the text file manually) it will login. My test for that includes a messagebox that pops up to notify if i have a valid user.
When it fails is adding a new user. So my question is a few parts i guess. Am I approaching this problem correctly? if not is there a easier way? Is it possible to place these fields in the simple editor example in chapter 17?

to any and all replies thanks

Last edited by csmhowitzer; April 3rd, 2009 at 08:00 PM..
 
Old April 3rd, 2009, 08:11 PM
Registered User
 
Join Date: Apr 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry i just reopened VS to make sure that i have the correct example posted, and i don't. What i wanted to say was that i would like a username and password field in the chapter 16 MDI text editor, that is the one where you can open multiple windows. I noticed that the chapter 17 simple text editor i mentioned in my first post may cause errors and that the text boxes would be inside another text box and i figured that would make errors.

Anyways.

When i tried programming in a name and pass i made my own form with the two fields (name and pass).

and thanks again to any and all replies





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get username and password somarya08 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 7 April 1st, 2009 03:02 PM
username and password : IIS gemini_shooter Dreamweaver (all versions) 18 July 16th, 2008 04:45 PM
Regarding Username and password kuku_ashu Javascript How-To 0 January 4th, 2008 11:28 AM
username and password abhi_loveu2002 ASP.NET 2.0 Basics 1 December 14th, 2006 05:25 AM
Username and password Hennie Access 1 July 28th, 2006 12:43 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.