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...

i have two textboxes one for user name and another for
password . i have a table name compare(which contains
name,passwod etc.,)my doubt is how compare username
textbox with name column and how compare password textbox
with passwod column. i want the code

Answer Posted / srilekha

{

string s=string.Format("select * from compare where
name='{0}' and Password='{1}'",textbox1.Text,textbox2.Text);
SqlDataAdapter da=new SqlDataAdapter (s,conn);
DataTable dt=new DataTable();
da.Fill(dt);
if(dt.Rows.Count>0)
{
Lable1.text="login successfull";
}
else
{
Lable1.text="login fail";
}

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is acid in ado.net?

1107


What is sqldatareader in ado.net?

970


Explain advantages of ado.net?

1101


What is the difference between an ADO.NET Dataset and an ADO Recordset?

1090


What do you know about ado.net's methods?

1176


What two types of data providers does ADO.NET supply? What determines which one you should use?

1040


How can we load multiple tables in a dataset?

1240


Why ca not we use multiple inheritance and garbage collector paralelly in .net?

1056


What are the essential features of ado.net?

1010


What Is Difference Between Ado And Ado.net?

1083


What is maximum pool size in ado.net connection string?

1024


How does entity framework work?

970


What are the advantages using ado.net?

1090


How do you update a dataset in ado.net?

1064


Does executenonquery return a value?

1005