我有一个DropDownList
内部中继器,每当更改所选文本时,我都必须在其中显示它,TextBox
但Object reference not set to an instance of an object
出现错误
protected void Ddl_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList ddl = (DropDownList) sender;
RepeaterItem item = (RepeaterItem) ddl .NamingContainer;
TextBox txt = (TextBox) item.FindControl("TextBox4");
txt.Text = ddl.SelectedItem.Text;
}