You are viewing our Forum Archives. To view or take place in current topics click here.
Help fix this simple c# issue
Posted:

Help fix this simple c# issuePosted:

Dubbed
  • V5 Launch
Status: Offline
Joined: May 15, 201113Year Member
Posts: 1,543
Reputation Power: 65
Status: Offline
Joined: May 15, 201113Year Member
Posts: 1,543
Reputation Power: 65
Essentially I am only starting to seriously get into programming after a short placement with a massive software development company so I am definitely not well educated as you will be able to tell by the image you are about to see (i felt it was fitting to put it in so it could help show what i am tying to do as i am probably not going to explain this well).

Firstly i attempted to pull the usernames and passwords from a database using some code i found on the internet which did not work and then wasted my time as i tried to find fixes online and try to modify it myself. Im leaving that for now but i want a temporary log in screen to help test and add new features so i have attempted a method of using the text input into the textbox and comparing it to a username or password directly. Unfortunately i am so new to this i do not know the function for this or if it is possible but by what you can see below i attempted it using bool and int which obviously wouldnt work.

[ Register or Signin to view external links. ]


Is there a way i can redo some of this (probably most of it) in order to get what i want working until i have the database linked properly in the future?
#2. Posted:
ip
  • Gold Gifter
Status: Offline
Joined: Dec 30, 201211Year Member
Posts: 3,778
Reputation Power: 3016
Status: Offline
Joined: Dec 30, 201211Year Member
Posts: 3,778
Reputation Power: 3016
First of all, why are you trying to parse a string to an int? It would be easier for you to just set it as a string and have inUser = tbUser.Text.
#3. Posted:
Dubbed
  • TTG Senior
Status: Offline
Joined: May 15, 201113Year Member
Posts: 1,543
Reputation Power: 65
Status: Offline
Joined: May 15, 201113Year Member
Posts: 1,543
Reputation Power: 65
Liability wrote First of all, why are you trying to parse a string to an int? It would be easier for you to just set it as a string and have inUser = tbUser.Text.


I dont know if i am doing something incredibly wrong but it is telling me i cant do that
#4. Posted:
ip
  • Summer 2018
Status: Offline
Joined: Dec 30, 201211Year Member
Posts: 3,778
Reputation Power: 3016
Status: Offline
Joined: Dec 30, 201211Year Member
Posts: 3,778
Reputation Power: 3016
Here is something I quickly typed up, it should fix your problem.
[ Register or Signin to view external links. ]
#5. Posted:
Dubbed
  • V5 Launch
Status: Offline
Joined: May 15, 201113Year Member
Posts: 1,543
Reputation Power: 65
Status: Offline
Joined: May 15, 201113Year Member
Posts: 1,543
Reputation Power: 65
Liability wrote Here is something I quickly typed up, it should fix your problem.
[ Register or Signin to view external links. ]


thank you so much ill give that a try now
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.