hi,
the problem is on this line
sql = "SELECT UserName,Password from tblLogin where UserName= '" + txtU.Text + "', Password ='" + txtP.Text + "'";
your callling select statement that is not correct format.
the select query is like this..
select * from table_name where col_name=condition1 and col_name=condition2
but in your select query instead of and your using (,).