If it's saying that "The connectionString property has not been initialized." then it's pretty obvious why:
When you run your
EducationfieldExiste
method it always does this:
finally
{
con.Dispose();
con.Close();
}
So when you try to use the same connection object again immediately:
if (EducationfieldExiste() == true)
{
Degreeexist.Visible = true;
}
else
{
SqlCommand cmd2 = new SqlCommand("Insert_Education_Degree_TB", con);
...
the
con
SqlConnection object has been destroyed - you can't use it again.
Either change your code to close the connection only when you are finished with it, or create a new connection (and dispose it) each time.