Without running your code, we can't be sure - but if you run it in the debugger it will stop on the line that causes the problem and it should be obvious, particularly if you use the debugger to look at the variables and what they contain.
But...I'd guess it's your "cmd" object - I don't see anything in that code which gives it a value at all...
Personally, I wouldn't declare the Connection or Command objects as class level - keep them local and use a
using
block to ensure they are Disposed properly:
using (SqlConnection con = new SqlConnection(strConnect))
{
con.Open();
using (SqlCommand cmd = new SqlCommand(" ... ", con))
{
...
That also has the advantage that you can't use it unless it has a value, because it goes out of scope at the end of the using block and the compiler will complain if you try to use it.