int temp = Convert.ToInt32(userExist.ExecuteScalar().ToString());
In the above line userExist.ExecuteScalar() will return the value of first row and first column. Suppose the command returns an e-mail address "abc@xyz.com". Can it be converted into an integer? And if it does not return any row, how can that result be converted into an integer? You have to handle these things gracefully. Use a count in your query. For example:
string cmdStr = "Select count(EmailAddress) from TableSecurity as result where EmailAddress='" + TextBoxEA.Text + "'";
You might escape the error but still, your approach is not correct. Start using stored procedure and check the conditions in the back-end.