Solution:
I guess you have declared your connection variable inside your class so it gets opened when you first tried to use it and then it stays that way. If you are trying to click the button after your connection is opened then I can tell you are trying to open connection again.
Best way is to use a local connection variable and open your connection as late as possible in your code and close connection with the help of using() as early as possible. Please have a look at below code sample.
using (SqlConnection connection = new SqlConnection(connStr))
{
connection.Open();
// Do your main work here
}
// Do your other work here
If you are sharing connection object and then you are keeping it idle for some time in that case also you can get the exceptions when you try to use it. So checking the State
will not help as it stays as opened until you explicitly change the state using Close() or you try to use it in some or the other way. After you get the exception your State will be updated.