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 is a meaning of self movitate

0 Answers  


whatis type?

1 Answers  


Perform the following arithmetic operations using 8- bit binary signed 1’s and signed 2’s complement notation for integers. (Please note that the numbers given here are in decimal notation) (3 Marks) i) Add – 52 and 68 ii) Subtract 66 from – 62 ii) Add 28 and 100 Please indicate the overflow if it is occurs.

1 Answers  


A 5 mints time is given to you to say atleast 50 words ,which dont contain ABCD?

4 Answers   Baidu,


I am Master with Statistics, MBA(finance and marketing)and SAS base training taken , seaching jobs in SAS analyst after 12 working in education as educator for statistics

0 Answers  


Who built Hyderabad?

0 Answers  


why do you want to job in ntpc

1 Answers   NTPC,


tell me about yourself ?

0 Answers  


Could anyone help me in knowing the address of Nageshwar Rao Institue in SR Nagar. How many months does he take to complete the course in Manual Testing? What would be the fee? Kindlu suggest any other best institutes for MANUAL TESTING with the faculty name.

0 Answers  


How many hardisks can you connect to a IDE?

7 Answers   Brigade,


why do we need to train employees?

0 Answers  


Tell me something about your 2 strong point and 2 weak point

0 Answers   CMS,


Categories