Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
How do you "Link" a button and a text box? Right now, I'm testing around with a password storing program where the user must first type a user name and password,both separate text boxes,then a panel becomes visible,with a label that says "Choose an account",followed by a list box that will have multiple different accounts,then a button below that to select them,to where when the person clicks an option,they must click the select button. Next to those(also on the panel) are 3 labels and 3 read only text boxes, the labels say "Account Name","Login",and "Password",there is 1 text box below each of those. When the user clicks the account under the list box and clicks "select",I want the correct account name(same as in the list box),that account's login,and that account's password. So basically have 2 questions,linking the username and password in the beginning to where it must be the correct login or else a message box will come up saying something like "Login Incorrect",but if they have the correct logins,the panel will become visible and show up next to the page. The next question is about the list box and linking the button,and linking the button to the 3 read only text boxes. How do I do this? So far,I added an example,there is 1 item under the list box,which is "banana1". The accountname is Banana2(so I don't get confused while I work on it,I will change it once I am done with the program),the user name is "pickle",and the password is "potato123". Help,please?
Posted 6-Oct-12 16:17pm
Comments
Wes Aday at 6-Oct-12 21:48pm
   
Very confusing. You would "link" your textboxes and the buttons the same way that you did for your quiz...
Devin Halbert at 6-Oct-12 21:51pm
   
Yes,but that was with radio buttons,I do not know how to have it set up to when the user clicks an account name,then clicks "select",that the correct items show up. With the quiz,I could use radio buttons and in code type that when rdbA1 was clicked,then display whatever. Here,I don't know how to do so with a list box.
Wes Aday at 6-Oct-12 21:58pm
   
Did you bother looking up the listbox in the documentation and seeing if there was something there that would tell you what was selected? The SelectedIndex maybe? SelectedItem? SelectedValue?
Devin Halbert at 6-Oct-12 22:04pm
   
Wait,found it! Thx alot lol....Yea I'm pretty much a blonde at programming ;)
Devin Halbert at 7-Oct-12 13:00pm
   
Hey another question though,How would I set it up to where a user can create a new account in the list box and also add their username and password,AND to where when they click that account name and click select,that it will show the account name,username,and password?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

With help of Wes comments, OP was able to resolve it. Posting this to pop it out of unanswered list.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,382


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 7 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100