Hi Dave,
If you are bounding controls in FormView InsertItemTemplate, then
you need to manipulate the control content in PreRender method. You
cannot set the textbox value in Page_Load event.
1. Attach the PreRender event for FormView Control.
2. Find the control you are looking for.
3. If the control is present, set the value.
protected void FormView1_PreRender(object sender, EventArgs e)
{
Control ctrl =
this.FormView1.FindControl("CompanyNameInsertInsertItemTextBox");
TextBox txt = ctrl as TextBox;
if (txt != null)
{
txt.Text = "Hai"; //Set like this.
}
}
There may be better way(s) than this. I hope it may help you.
-- karthik D V