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

hi friends!this is pooja ,i was called for an interview on 27th of may for the clerical carde in SBI.cud u plz help me out to present better

0 Answers  


Hello, My name is kassande and I would like to know what Acc, in banking terms, means? Thank you

0 Answers  


What types of challenges have you faced in the past two years and how did you overcome them?

0 Answers  


hello , i am sumit.,,. if anybody need sbi po material ,., and marketing questions .,,.. contact me,.,. i can help u,.,,.

35 Answers   State Bank Of India SBI,


what is the shortkey of print preview in M.S. EXCEL?

0 Answers  


hi, pls suggest me.... i m doing software testing now. i hv changed my field Bsc bio to comp. sci. my graduation is completed with bio science then PG with M.A. (eco.), after that i switched in PGDIT(comp. Diploma). and with this my percentage is in reversing order from 10th to M.A. so what should i reply for changing fields and decreasing percentage, if i face these questions in interview???

0 Answers  


sir i got a call from cabinet secretariat regarding i got selected in dfo(gd) 2013 on 28/5/2016 to come for filling of some details in my interview attestation form,which i submitted.Now when will my verification be completed and got the appointment letter.Is anybody got the same

0 Answers   Cabinet Secretariat,


which is the deepest lake in the world

1 Answers  


discuss the pros and cons of subsidized state agricultural financing in Rural and Agricultural Development

0 Answers  


how to get c & f agengy licence or ragistration ??

0 Answers  


I have completed mba, i'm so much intrested in group2, can u plz tel me how to prepare for this exactly.

0 Answers  


Two persons on death bed, one is whom u love n anothr is who loves u. U can save only one. Whom would u n why?

1 Answers  


Categories