TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Khoi
NA
18
0
Log in probelm
Nov 15 2009 11:26 AM
I want to create a log in form. Any user just inputs a user name "sa" and a password "callcenter", the program will pop up a window says Welcome, otherwise it says "Wrong password". But my code got an error as "
Use of unassigned local variable 'input'
". Please advise
int input;
string LoginName, Pass;
LoginName = txtUserName.Text;
Pass = txtPassword.Text;
input = input + 1;
if ((LoginName == "sa") && (Pass == "callcenter"))
{
lblMessage.Visible = true;
lblMessage.Text = "Welcome";
}
else
if (input < 3)
{
lblMessage.Visible = true;
lblMessage.Text = "Wrong Pass. Try again";
txtUserName.Focus();
}
else
{
MessageBox.Show("Unauthorized access,aborted");
Close();
}
Reply
Answers (
2
)
Changing a Cursor and DataGridviewCell events.
Problem in creating table at runtime in c#.. Plz Help Dear ones... URGENT