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

Does anyone know some strategies for the free android game Grand Battle? Need you help!! I really love the game Grand Battle, and I fell excited when I defeat the enemies and protect my base as a commander. Now I think I need some strategies to improve my performance and to lead a strong army, could anyone help me? Thank you so much!

1 Answers  


name the places where the indian govt has given its nod to set up four new tiger resereviors?

0 Answers  


Who is the Best cricketer Now...is is still sachin or any?

1 Answers  


can anybody tells me about the latest walkin for M.C.A in software companies?

0 Answers  


Had you thought of leaving your present position before? If yes, what do you think held you there? 11. What are your strong points? 12. What are your weak points? How long would you stay with us?Why are you leaving your present position? 48. What are your career goals? Why should we hire you?How much do you expect if we offer this position to you?

0 Answers   Wipro,


What is mean by stacking?

0 Answers  


What are the test cases for booking one ticket for same movie, for same time but many users.

0 Answers   TCS,


In which court was a Chinese embassy sent by T'ang emperor?

1 Answers  


What can you do for us that someone else can't?

0 Answers   Siemens,


Which language was mostly used for the propagation of Buddhism in ancient period

3 Answers  


Can any one know the questions asked by Federal bank in Interviews?I cleared both PO and Clerk Exams held on 2009. If any One Know that Pls help me..Unni

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  


Categories