Three Way to Change Textbox Value on Dropdown Value Changed

Step 1: Simple textbox text change on dropdown value change. 
  1. protected void ddlProducts_SelectedIndexChanged(object sender, EventArgs e)  
  2.     {  
  3.         
  4.         txtName.Text = "change value here";  
  5.   
  6.     }  
Step 2: If textbox is inside any data control.
  1. protected void ddlProducts_SelectedIndexChanged(object sender, EventArgs e)  
  2.     {  
  3.         DropDownList ddl = (DropDownList)sender;  
  4.         GridViewRow row = (GridViewRow)ddl.NamingContainer;  
  5.         TextBox txtName = (TextBox)row.FindControl("txtCp");  
  6.         txtName.Text = "*****";  
  7.   
  8.     }  
Step 3: If textbox is inside parent control.
  1. protected void ddlProducts_SelectedIndexChanged(object sender, EventArgs e)  
  2.     {  
  3.         DropDownList drop = sender as DropDownList;  
  4.         TextBox txt_box = drop.Parent.FindControl("TextBox1"as TextBox;  
  5.         if (txt_box != null)  
  6.             txt_box.Text = drop.SelectedValue;    }