0

Hi Everyone,

I know this sounds silly but Ive been so caught up with designing efficient logins that interact with a database that Ive forgotten how to do it the hard coded way.

I have to create a little application that interacts with a database, but it doesnt have to be so complex as its just going to be an "in-house" application if you like.

****** The problem ******

string username, password; //String variable declarations

public void validateLogin()
        {
            //Check if data entered matches correct log in details
            if (input_username == username) // && password == input_password)
                lbl_status.Text = "Test string should display if username is equal";
                //Login successful - display message
                //Set tabbed pane to visible
                //tabControl1.Visible = true;
               
            //Else display unsuccessful message
            //else lbl_status.Text = "Sorry, the details you entered were incorrect.  Try again!";
        }

// Then button click event to call the validateLogin method

Surely my approach to this is right, the aim was to keep it simple lol but I seem to have forgotten the basic algorithm.

Please help

## input_username is a string holding data entered in a textbox.text

1
Contributor
1
Reply
2
Views
9 Years
Discussion Span
Last Post by Elmo_loves_you
0

Never mind, got her sorted! :)

just used the textbox.text directly rather than passing it to a string variable

:)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.