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

What does competitive analysis mean to you and what techniques do you use?

1 Answers  


hi letme know which is the best coaching centre for RRB exams in Chennai ? I need full address with contact no.thank u. Contact me in 9791776758 anytime.

0 Answers  


Recently I got an job offer by Deloitte for the post of tax consultant at Hyderabad, India after my interview. I accepted the offer but did not receive any acknowledgement of my acceptance.So I am a bit worried that whether they have taken into consideration my acceptance or not????? It was an electronic offer so I had to give my consent thru mail as it was stated... so i wanted to know det usually do you receive a reply for a your acceptance....throw some light on this issue please....

0 Answers  


hi, im working as a domestic helper in malaysia and i want to ask what are the documents needed if i want to apply for a visit visa to australia alone without my employer.is there a big chance for me to get a visa. hope you can help me.

0 Answers  


I m doing a job in a psu as distribution engineer. Now I m looking for a job in an electrical manufacturing company where I can boost up my professional knowledge.i dont have such experience for getting such a job . Pls suggest me how to shift from distribution to manufacturing.

0 Answers  


How to use High Level Recruit Card in the game of Grand Battle? I have downloaded the free Android game Grand Battle on Google Play, I love it very much. And yesterday I got a high level recruit card, but I do not know how to use it. Could any Grand Battle fans help me? I cannot wait to find the way! Thank you so much.

1 Answers  


Hi, I have passed in the SBI Clerical Cadre Exam, written in July. I have received the call letter. I have completed my graduation in B.Sc(CompSc). So, I want to know whether I will be asked queries out of my syllabus. For instance, a query in accounts, I dont have any idea about that subject. Please guide me how to face the interview and what sort of questions, i will be asked. As the interview day is nearing, am getting nervous.

0 Answers  


What happens when centrifugal pump is operated with closed discharge valves?

0 Answers  


why the the name "MOGHAL" adopted as name of the dynasty?

1 Answers  


what is your responsibilities of your job?

0 Answers  


tell me about you? That what is your qualification, your family background, what is your likings, what you are looking now?

4 Answers   KPIT,


who is the explorer of bicycle

1 Answers  


Categories