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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

can any one help me ,i'm appearing syndicate bank clerical exam on 27-6-10

1965


I gave the SBI Clerical Exam paper from Bangalore (Karnataka Circle) and I cleared my Exam and I appeared for Interview in Bangalore. Now I have moved Permanently to Gurgaon (Haryana) and I wish to join SBI, if I clear the Interview as well.. Can I join SBI Gurgaon (Haryana)..? Pls. suggest...

1989


IN WHAT LANGUAGE I HAVE TO GIVE INTERVIEW OF BANK CLERK?

2236


when will sbi clerical final result out?????? interview held in the months of april and may 2010

2432


What is mean by CRT interview????

8338


what sort of trainings would benefit you in the next year? not just job skill but also your natural strength and personal passion

1336


Why do u wish to pursue a career in management?

2193


Dear Friends, Can any body provide RC Reddy study material for GROUP-II exams. Or can u plz tell me where can I get RC reddy Printed study material for Group-II. It would be highly appriciated if you provide me the details.

1955


What is the most difficult situation you have ever faced in your life?

3039


what were the causes of swadeshi movement?

4667


What is the capital of Argentina?

2064


How many pages are in 1 coil?

1993


I am Master with Statistics, MBA(finance and marketing)and SAS base training taken , seaching jobs in SAS analyst after 12 working in education as educator for statistics

2284


how do we calculate water consumption for brick work , plaster,land scaping and emergency for new commercial project

2606


what are your major limitation

1934