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

Sir, I am selected as a scale 1 officer in a pvt sector bank. What would be my responsibilities in the job??

1940


how can you identified yourself?

1892


i had completed diploma in electrical & electronics engineering . did i have to get any other certificates for applying any government posts ?

1824


how does thomas cook interface with their customer??

1862


what are the leadership qualities?

2285


Why do u wish to pursue a career in management?

2206


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

1895


quantatitive application of polarimetry ?

2049


Can you balance rural urban divide in education?

2227


Hi Friends, One of my Friend is got selected in Karnataka Bank exam and He has to face interview so you if anybody has previous interview exp with karnataka bank could you please let us send expected interview questions. My special request friends if you know please let him know and help him out for get a success. send us mails at sreenivas.boddeti@gmail.com/santhosh_vegi@yahoo.com

2075


name the sikkim state bird?

3795


Briefly describe your ideal job

2085


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

1997


Hi friends I was selected for SBI clerical interview and my interview is on may 7 I completed B.sc Computers wat are the questions to be asked regarding computers.....can u pls post the answer for me.........JO

2008


Heloo I am vidhi i have jst cleared the 1st round of capital iq.so now i want to know its whole process the profile is research associate. please attach some placement papers if u have any ??? and how should i prepare for its 2nd level test ?? and wt kind of subjective question do they ask?? and what do they ask in manager and directors interview??

3338