Hi ,
Try this
protected void TextBox2_TextChanged(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(@"Data Source=IT-DEV2\SQLEXPRESS;Initial Catalog=test;Integrated Security=True");
string statment = string.Format("select item_code, Item_name, brand, size, section, price, Material, Qty, tax,tDate from Items where tDate ='{0}'", TextBox2.Text);
SqlDataAdapter da = new SqlDataAdapter(statment, con);
DataSet ds = new DataSet();
da.Fill(ds);
DropDownList1.DataSource = ds.Tables[0];
DropDownList1.DataTextField = "Item_name";
DropDownList1.DataValueField = "item_code";
DropDownList1.DataBind();
}
<div>
<asp:TextBox ID="TextBox2" runat="server" ontextchanged="TextBox2_TextChanged"></asp:TextBox>
<asp:CalendarExtender ID="TextBox2_CalendarExtender" runat="server"
Enabled="True" TargetControlID="TextBox2">
</asp:CalendarExtender>
<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
</div>
Best Regards
M.Mitwalli