Before you test following condition
if ((dt.Rows[0]["sponcorid"].ToString() == txtsponcorid.Text) && (dt.Rows[0]["sponcorname"].ToString() == txtsponcorname.Text.ToString()))
{
}
else
{
make sure data record have or not in the datatable. Add the condition
if(dt.Rows.count > 0){
after that you add your condition.
Hope be helpful,
Theingi.