0
Before saving the record get all the days from the database with the name suresh
Select Day from table where name='Suresh'
SqlConnection con=new SqlConnection("your connection string");
SqlCommand cmd=new SqlCommand("Select Day from table where name='"+condition+"'",con);
SqlDataAdapter da=new SqlDataAdapter();
da.SelectCommand = cmd;
DataSet ds=new DataSet();
da.Fill(ds);
List<string> lstDays=new List<string>();
for(int i=0;i<ds.Tables[0].Rows.Count;i++)
{
lstDays.Add(ds.Tables[0].Rows[i]["Day"].ToString());
}
if(lstDays.Contains(textboxvalue)
{
MessageBox.Show("The day already exists");
}
else
{
insert to table
}