Not a direct solution but some tips to improve your skills.
First,
NEVER accept unvalidated user input and concatenate a SQL Commmand.
EVER. Do some research on SQL Injection attacks and you will understand what bad things will happen. You should be using parameterized queries at a minimum.
Make use of using blocks.
using(SqlConnection conn = new SqlConnection(...))
{
}
This makes no sense
txtdate.Text = Convert.ToDateTime(date).ToString("dd-MM-yyyy");
You are converting some string to a date then back to a string only to assign it to a textbox. Then later using that textbox value in the SqlCommand. Use the string directly.
txtdate.Text.ToString()
The text property is already a string. You don't need to use ToString on a string.
Don't put this in the Page_Load event.