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
How to enable and disable connection pooling?
What does sqldatareader return?
Describe the command object and its method.
What is serialization and de-serialization in .net? How can we serialize the dataset object?
What is datatable in ado.net?
Explain the difference between ado and ado.net?
Define data adapter?
What are good ado.net object to replace to ado recordset object.
What are the rules to implement connection pooling?
What is data adapter in ado.net with example?
Explain what is datagrid with an example?
How to identify the controls which can be used for binding data?
What is the difference between an ADO.NET Dataset and an ADO Recordset?
What does executequery return?
What is aggregating data ?