My Ajax Calender Extender Not working, date not inserted in db.
Please help me
.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="plan_a_task_pop.aspx.cs" Inherits="plan_a_taskaspx" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="css/text.css" rel="stylesheet" type="text/css" />
<link href="css/myclass.css" rel="stylesheet" type="text/css" />
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager" runat="server" />
<table width="100%" id="table1" runat="server">
<tr>
<td class="table_bold_text2" align="left">
Date of Execution:
</td>
<td>
<asp:TextBox ID="txt_date" runat="server" ReadOnly="true" CssClass="table_grey_border" Width="178" />
<ajaxToolkit:CalendarExtender Format="MM/dd/yyyy" ID="CalendarExtender2" runat="server" Enabled="True" TargetControlID="txt_date" CssClass="MyCalendar" />
</td>
</tr>
<tr>
<td></td>
<td>
<asp:Button ID="btn_submit" runat="server" Text="Submit" OnClick="btn_submit_OnClick" />
</td>
</tr>
</table>
<table id="table2" runat="server" visible="false">
<tr>
<td class="table_bold_text2">Dear user, your task has been submitted successfully.</td>
</tr>
</table>
</div>
</form>
</body>
</html>
.cs
protected void btn_submit_OnClick(object sender, EventArgs e)
{
string strqry = "";
string date = txt_date.Text;
strqry = "insert into tbl_order_task_details(order_id,buyer_name,date_of_execution,subject,detail_of_task, assigned_to,Category,SubCategory) values('" + Session["order_id"].ToString() + "','" + ViewState["customer_id"].ToString() + "','" + date.ToString() + "','" + tt_subject.Text.ToString().Replace("'", "''") + "','" + tt_details_of_the_task.Text.ToString().Replace("'", "''") + "', '" + ddl_user.SelectedValue.ToString() + "','" + ddl_category.SelectedItem.ToString() + "','" + ddl_subCategory.SelectedItem.ToString() + "')";
obj.openDatabase();
obj.executeMySqlqry(strqry);
obj.closeDatabase();
tt_details_of_the_task.Text = "";
tt_subject.Text = "";
ddl_subCategory.Items.Clear();
ddl_category.Items.Clear();
ddl_user.Items.Clear();
}