Login Screen



Login Screen..

Answer / santro

/*Loginscreen.aspx.cs*/
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class loginScreen : System.Web.UI.Page
{
string strConnectionstring;
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Login1_Authenticate(object sender,
AuthenticateEventArgs e)
{
strConnectionstring =
ConfigurationManager.AppSettings["strLogin"];
SqlConnection con = new SqlConnection
(strConnectionstring);
//SqlConnection con = new SqlConnection
("username=bhushan;password=softima;initial
catalog=sample;data source=localhost");
con.Open();
SqlCommand cmd = new SqlCommand("select count(*)
from login where username='" + Login1.UserName + "'and
password='" + Login1.Password + "'", con);
int i = (int)cmd.ExecuteScalar();
if (i > 0)
{
//FormsAuthentication.RedirectFromLoginPage
(Login1.UserName, Login1.RememberMeSet);
Response.Redirect("pgDrugNames.aspx");
}
}


}
/*Web.config
<appSettings>
<add key="strLogin" value="user
id=sa;password=sasa;initial catalog=sample;data
source=localhost" />
<add key="strSample" value="user
id=sa;password=sasa;initial catalog=sample;data
source=localhost" />
</appSettings>*/

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Everything Else AllOther Interview Questions

when wil the SBM clerical interview results be announced? and how??

0 Answers  


how do i get friends and there email

0 Answers  


Who is the person to have laid the foundation of research in Statistics in India ?

0 Answers   CAT,


What is DDNS and why do I need it?

1 Answers   HCL,


hi frndz.. plz help me that i have eye problem. Is it a matter in medical test? do dey will reject me if i fails in eye checkup. i would like to join in IT company. plz reply me

0 Answers  






Which city is famous for high buildings?

0 Answers  


Hi, I Have have completed my Post graduation in Msc(Comp Science) I want to apply for research in india or abroad How to apply? When to Apply? Even i am preparing for GRE exam. Please provide me with your valuable guidance to shape up career... Thanks :)

0 Answers  


the key persons of jallianwalla bagh massacre? who rendered vishnu sahasranamam in the form of casettes? which associate bank of sbi already merged n wich is going to merge? founder of andhra bank? reasons for selecting the banking sector?

0 Answers   State Bank Of India SBI,


1. +BRIEFLY DESCRIBE YOUR IDEAL JOB 2. WHY DID YOU CHOOSE THIS CAREER, 3. WHAT GOALS DO YOU HAVE IN YOUR CAREER, 4. HOW DO YOU PLAN TO ACHIEVE THIS GOALS, 5. CAN YOU WORK WELL UNDER DEADINES OR PRESSURE, 6. TELL US ABOUT A TIME WHEN YOU FAIED TO MEET A DEADLINE WHAT WERE THE REPERCUSSIONS, 7. DO YOU HAVE REFERENCE LIST, 8. WHY DO YOU WANT TO WORK HERE. 9. WHY SHOULD WE HIRE YOU , 10. HOW SOON CAN YOU TRVEL DOWN TO START YOU NEW JOB, 11. WHAT JOB POSITION ARE YOU CURRENTLY HOLDING WITH YOUR CURRENT EMPLOYER, 12. WHO WAS YOUR BEST BOSS AND WHO WAS THE WORST, 13. WHY ARE YOU LEAVING YOUR JOB, 14. WHAT HAVE YOU BEEN DOING SINCE YOUR LAST JOB, 15. WHAT WERE YOUR RESPONSIBILITIES, 16. HOW MANY HOURS DO YOU NORMALLY WORK, 17. HOW DO YOU HANDLE STRESS AND PRESSURE, 18. WHAT MOTIVATES YOU, 19. WHAT ARE YOUR SALARY EXPECTATIONS, 20. TELL ME ABOUT YOURSELF, 21. WHAT HAS BEEN THE GREATEST DISAPPOINTMENT IN YOUR LIFE, 22. WHAT ARE YOUR PET PEEVES, 23. WHAT DO PEOPLE MOST OFTEN CRITICIZE ABOUT YOU, 24. WHAT WOULD YOU DO DIFFERENTLY, 25. DO YOU PREFER TO WORK INDEPENDENTLY OR ON A TEAM, 26. GIVE SOME EXAMPLES OF TEAM WORK, 27. HOW DO YOU EVALUATE SUCCESS, 28. WHAT INTERESTS YOU ABOUT THIS JOB, 29. WHY DO YOU WANT THIS JOB, 30. WHAT APPLICABLE ATTRIBUTES/ EXPERIENCE DO YOU HAVE, 31. ARE YOU OVERQUALIFIED FOR THIS JOB, 32. WHAT CAN YOU DO FOR THIS CAMPANY, 33. WHY SHOULD WE HIRE YOU, 34. WHAT DO YOU KNOW ABOUT THIS COMPNY, 35. WHY DO YOU WANT TO WORK HERE, 36. WHAT CAN YOU CONTRIBUTE TO THIS COMPANY, 37. ARE YOU WILLING TO TRAVEL, 38. WHAT IS IMPORTANT TO YOU,

1 Answers  


UNDER WHICH ARTICLE OF THE CONSTITUION OF INDIA NATIONAL EMERGENCY CAN BE IMPOSED? (A)352 (B) 356 (C) 360 (D) 368

1 Answers  


hi sir, my name is vijay reddy.i have some doubts. 1) how much u r taking fees for groupII. 2) What is cost of groupII material. 3) your current address.right now i am staying at YOUSUFGUDA

0 Answers  


winner team of fifa world cup 2006

0 Answers   NIFT,


Categories