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 |
studying microwave office software what can i do?
What is Micro-kernel? What are the benefits of Micro-kernel?
0 Answers Baidu, Sikkim Manipal University,
pls tell me how to introduce my self in a perfect way if the interviewr ask question tell something about ur self pls post answer with example as early as possible. about my self i completed my b.com.degree in the year 1999 afer that i joined in bdps computer inst i learned c,cpp,oracle,java,vb,ms office after completion of that i joined as a lab assistant in the same institute i worked there for 2 years after that i joined as a back end executive in a mnc general ins company for 2 years,about my family i have 3 brothers well setteld in the business my mother is house wife my father expired in a road accident this is my job,study and my family back ground now u pls tell me how tell this in interview in a perfect way.u pls post answer.
what is the role of marketing employee in a company.
i need information about LOVE MARRIAGE V's ARRANGE MARRIAGE at least 2 mints
if i purchased goods worth rs. 100000/- and paid rs. 12500/- as local vat and transferred the same goods to my branch in other state against form `f` which amount we claim in my local vat return or can we adjust the 12500/- with my other output taxes create with other sales
WHAT DOES '20' REFER IN THE TWENTY20 CRICKET?
what do you think of your previous boss?
1.Briefly describe your ideal job?
Who is the best football player in the world?
different of bank statment and stock transfer in cash book
hi i want to know about examination of deputy field officer under cabinet secretary. when is it started. how many stage are completed to reached the interview board. actually i am b. com graduate. i send my application to the address of AD(Pers-A), post box no 3003 lodhi road post office new delhi-110003. i don't know about AD(Pers-A). but i write this word on the envelope which was send to the post office. is it correct addressed. have a any chanced to can celled my application. what type of question i have to faced in the written examination. can u give me any sample paper of this examination. thanks