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 |
hi friends!this is pooja ,i was called for an interview on 27th of may for the clerical carde in SBI.cud u plz help me out to present better
Hello, My name is kassande and I would like to know what Acc, in banking terms, means? Thank you
What types of challenges have you faced in the past two years and how did you overcome them?
hello , i am sumit.,,. if anybody need sbi po material ,., and marketing questions .,,.. contact me,.,. i can help u,.,,.
35 Answers State Bank Of India SBI,
what is the shortkey of print preview in M.S. EXCEL?
hi, pls suggest me.... i m doing software testing now. i hv changed my field Bsc bio to comp. sci. my graduation is completed with bio science then PG with M.A. (eco.), after that i switched in PGDIT(comp. Diploma). and with this my percentage is in reversing order from 10th to M.A. so what should i reply for changing fields and decreasing percentage, if i face these questions in interview???
sir i got a call from cabinet secretariat regarding i got selected in dfo(gd) 2013 on 28/5/2016 to come for filling of some details in my interview attestation form,which i submitted.Now when will my verification be completed and got the appointment letter.Is anybody got the same
0 Answers Cabinet Secretariat,
which is the deepest lake in the world
discuss the pros and cons of subsidized state agricultural financing in Rural and Agricultural Development
how to get c & f agengy licence or ragistration ??
I have completed mba, i'm so much intrested in group2, can u plz tel me how to prepare for this exactly.
Two persons on death bed, one is whom u love n anothr is who loves u. U can save only one. Whom would u n why?