1st you set the autopostback properity of a textbox to true.
ten u write the code for insert as well as fetching operation in TextChanged event
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
DropDownList1.DataSource=
DropDownList1.DataTextField="Parent";
DropDownList1.DataBind();
}
hope this will help you