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 / vijay

sqldatasource s=new sqldatasource();
s.connectionstring=configurationmanager.connectionstring
["compareconnectionstring"].connectionstring;
s.selectcommand="select count(*) from compare where uid='"
+ textbox1.text + "'and pwd='" + textbox2.text + "'";
Dataview dv=new dataview();
dv=(dataview)s.select(datasourceselectarguments.empty)
if(dv[0][0]>0){} //found
else{}//not found

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you connect to a database by using .NET?

939


What are the Data providers in ADO.Net?

1017


How many major types of connection objects in ADO.NET?

1034


Which ado.net object is very fast in getting data from the database?

1103


What is connected architecture in ado.net?

1067


What are the methods of XML dataset object?

1026


Why is stored procedure used in ado.net?

1115


How to add a check box or a dropdown list to a column in a datagrid?

970


What is DataRowCollection?

1107


How to pass multiple tables in datasets simultaneously?

1058


Which object is used to add relationship between two Datatables?

1045


What is the use of SqlCommandBuilder?

1206


What is the default provider in ado.net?

964


Does entity framework use ado.net?

978


What is a string variable?

917