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

Define bubbled event?

707


what is the difference betwen typed dataset and untyped dataset?in general which dataset can we use in programming?

766


Which is better ole db or odbc?

697


Give an example of a .net application which connects to microsoft access database using ado.net classes.

817


What is isolation?

783


Is it possible to edit data in Repeater control?

718


Explain how to create dynamic gridview?

730


What is ado.net in vb net?

702


Explain the different row versions available in table?

764


Explain the difference in an abstract class and an interface?

724


Why do we need ado.net?

749


How to pass multiple tables in datasets simultaneously?

819


How to bind the controls(best practice) comboboxes to the data in the dataset?

807


What is ado.net object model?

731


What does sqldatareader return?

723