Look at your code:
ds = new DataSet();
string sql = "select * from registration";
da = new SqlDataAdapter(sql, CON);
da1 = new SqlDataAdapter(sql, CON);
string sa = txtEmail.Text;
string pw = txtPass.Text;
int r = 0, r1 = 0;
DataRow[] rs;
DataRow[] rs1;
rs = ds.Tables["registration"].Select("email='" + sa + "'");
Taking out all the lines which do not refer to (and thus affect)
ds
in any way:
ds = new DataSet();
rs = ds.Tables["registration"].Select("email='" + sa + "'");
Which means that you are ctreateing a new, empty DataSet, and then trying to use a table from it. It is empty, so no tables, so you get the "object Reference..." error.
I suspect that you need an
SqlDataAdapter.Fill(ds)
from either da or da1 before you try to use the DataSet.
I don't know why you have two identical SqlDataAdapters, though...