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

hi i have appeared my personnel interview for sbi clerical post on 6th may.. i am waiting for the final result.. can you tell me when will the final result..

1890


hii,anybody got joining letter in dfo(gd) 2013.PLZZ mail me at rahuldikshit7@gmail.com

1860


sir, when will start the new batch for group2 coaching... pls kindly inform me.......

1834


do anybody know that what are the facilities provided by SBI to their employees..?

4144


what is the meaning of AKALIYAT ?

3633


How did you go about planning for a recent event/project you handled?

1826


sir/madam, i would like to know the work for fresh engineering electrical graduates in psu,ies etc.,

1815


which plan and modem should i take for 3g internet usage mainly for downloads which gives me speed of 3.1 mbps,5.2 m bps,7.1 m bps and unlimited usage for a month .state haryana

1847


Hi friends I am sasi,Got selected for Syndicate Bank PO.I dont have any idea about Banking sector.I dont know how to prepare for the interview.Can anyone help me plz

2050


Sir me s.I ke bare me janna chahta hoo.s.I banne ke liye kya kya common chahiye .mene is sal isc diya.

1847


hello everyone I am from morocco and i have i-20 visa interview and i need help with a question COURSE OF STUDY : GENERAL STUDIES

1887


how many languages are listed in the 8th schedule of the indian constitution?

1899


She asked me to tell memorable event in my life for sometime and asked to introduce myself. She also asked about my roll model.

2687


(U,Y,T,A,O,O,M,R,R,F,Y,H,E,) Inhe aisa set kijiye ki ye ek romntic word ban jaye, Aur ye wahi kar sakta h jo kisi se pyar karta h, (It's chaleng 4u) p reply Bna koii wrdd??

2176


consultancies which provide experience letters in hyderabad for SAS JOBS

5539