Your code (possibly) crashes at
int result = cmd.ExecuteNonQuery();
If you enclose your code with 'try catch' structure, and add
lblMessage.Text=ex.Message;
in the catch block, you can see your exception.
Some advices:
1- design multitier application (design a separate class for data management)
2- enclose your UI handling codes in a 'try catch' structure to avoid 'unhandled exception' and a total crash.
3- use the debugger to trace your code.