Login Application

10 pts.
Tags:
URL
I would like to store mutiple usernames and passwords and login with the click of a button.

Answer Wiki

Thanks. We'll let you know when a new response is added.

What Kind of programming language do you want to use ?

if it is visual Studio then you need iis to be installed and configured
Install Configure IIS:

Click on Start Menu, choose control panel
Click on Switch to classic view link
Click on Add or Remove Programs icon
Click on Add/Remove Windows Components icon.
Double Click on Internet Information Services (IIS) option:
Select all the check boxes and click on OK button
Click on Next button; it starts configuring the selected components
If everything goes correctly; you’ll get the message like “you have successful completed the windows components wizard”
Finally click on Finish button

Code for user checking

SqlConnection con = new SqlConnection(“Data Source=ServerName;
Initial Catalog=MyTesting; Integrated Security=true;”);

SqlCommand cmd = new SqlCommand();

cmd.Parameters.AddWithValue(“@UserName”, txtUname.Text.Trim());

cmd.Parameters.AddWithValue(“@Password”, txtPword.Text.Trim());

cmd.CommandText = “Select * from Login where UserID=@UserName and Password=@Password”;
cmd.Connection = con;
SqlDataReader dr;
con.Open();
dr = cmd.ExecuteReader();
if (dr.Read())
{
FormsAuthentication.RedirectFromLoginPage(txtUname.Text, false);
}
else
{
lblErrorMsg.Text = “Invalid Login!”;
lblErrorMsg.ForeColor = System.Drawing.Color.Red;
txtUname.Focus();
}

Regards,

Bilal

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Kevin Beaver
    Is this something that can be handled with Firefox or IE? They can store multiple user names and passwords for this.
    17,740 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following