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

dear sir , how i prepare general studies of rbi .

0 Answers   RBI,


I m employee can i describe my daily routine? I can but my daily routine is same all the day its so boring. Can anyone help me? Is there any topic to describe my routine. Thank You

0 Answers  


WHAT IS CRR

0 Answers  


How many times fill return of PF and ESI by the company?

0 Answers   IBM,


Hi am having stammering problem,when i am cool i will speak well, but when i am in hurry or enthusiastic or anxiety about any thing i begin to stammer any one of u can help me out to reduce my stammering

4 Answers   Bank Of India,


Who is the highest run getter in test cricket

0 Answers  


how much merit cut off for bank exam clerk n po

1 Answers   Banking,


I want to know about Kangra Central Cooperative Bank's Interview Questions after getting the result of KCC Bank 2017

1 Answers   Kangra Central Cooperative Bank KCCB,


hi..ia gng to post sum of questions asked at axis bank..As i was an engineer graduate.Questions askd are h u relate banking to engineering?wht do u knw abt axis bank?wht r the products of axis bank?and abt my family?and my hobbies?

0 Answers   Axis Bank,


what are the important points to consider in scrutiny of trial balance?

0 Answers  


I am interested to work in the file

0 Answers  


Biggest international cricket stadium in the world? a) Eaden Garden,Kolkata b) MCG,Malbourne c) Vankhede Stadium d) Lord's,London

1 Answers  


Categories