I am trying to establish a server event to a TextBox at runtime. The TextBox is also established at runtime as follows:
TextBox txtCntl = new TextBox();
txtCntl.ID = "txtTest";
txtCntl.Text = dr1["Fcst_Forecast_Wgt"].ToString();
detailrow.Cells[7].Controls.Add(txtCntl);
txtCntl.TextChanged += new System.EventHandler(this.changeForecastWgt);
...
private void changeForecastWgt(object sender, System.EventArgs e)
{
lblCustomerDesc.Text = "Testing...";
}
I will eventually be adding other logic to the event, but I can not get this to work yet...
Thanks
Andy