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

How to aggregating data across related tables?

1040


What is ado recordset?

991


What is the difference between connected and disconnected environment?

1105


What is ado.net connection?

956


Explain the role of data provider in ado.net? What is the role of data provider in ado.net?

1001


Which name space is used to get assembly details?

987


What are the advantages and drawbacks of using ado.net?

1109


What is the difference in record set and dataset?

1027


How to pass values into a datatable?

1136


What is ole db query?

988


What is disconnected scenario in entity framework?

1113


Explain all the classes those are used for database connections between sql server and asp.net?

1007


What is the purpose of using adodb?

956


What is the meaning of object pooling?

1228


What is the DataTableCollection?

1051