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 |
Why do u what to change from current organization ?
any one send me buildings dry material in m.k.s and f.p.s system on this id plz. mughalsab@ymail.com
i have worked at paper industry in instrumentation dept as asst.engg for two years in bank interview they asked me why u are coming to the banking field. what concrete reason i can give for this
When will Syndicate Bank Probationary clerk recruitment results?
I have a construction Company i want to know the applicability of service tax on it
the normal RBC count in adult male is?
what are you own special abilities?
what is CRR?
batsman having hight test run average
Ang elepante na ba po ang susunod na mawawala sa ating daigdig?
sir, i have slected in sbi for clerk post and i have to face medical check up prosses. i want to know the process and list of medical tests of succesful candidates.you can send other bank medical check formalities
0 Answers State Bank Of India SBI,
why you want to join bpo?wht do you understand by it?