Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

china is a leading producer in what? (a) oil (b) iron ore (c) gold (d) coal

0 Answers  


Presently I'm doing my Post Graduation Diploma in Business Administration (Finance Stream). I'm working for a support related process. How to answer if any HR asks your stream is finance and the work you are doing is different which is not related to finance. Any suggestions please ?

0 Answers  


sir I have received a email from marutisuzuki forsalary rs.40000 to 50000/- before the interview the e mail says I deposit 15000/- for security deposit. Is it OK ? or is it fake interview email? Iam new to job interview

0 Answers   Baidu,


what is stand for PPPP?

0 Answers   CSD Bangladesh,


Can anyone help how a 5 years experienced IT recruiter self introduction in details in an job interview

0 Answers  


Can any body advise the best link to prepare for the forthcoming exams of Section Officer(Audit) to be held on the 30th of November? Does only 125 vacancies exist all over India in the general category?

0 Answers  


i want andhra bank po previous solved papers

0 Answers  


Why do you want to work for our company??

0 Answers  


Any difficult situation which u have ever handled in the absence of ur team leader? would be better if answer is from BPO (Call centers)

0 Answers  


Commonwealth Games data for google interveiw

0 Answers   Google,


what is a meaning of quick learn

0 Answers  


What is your current salary p.a.?

0 Answers  


Categories