formview changeMode

R

rodchar

hey all,
i'm doing the following inside a button click event.
i'm doing a FormView1.ChangeMode(FormViewMode.Insert) and following that i'm
trying to affect the visibility of a textbox control that is within
InsertItemTemplate of the formview but it's not working. the textbox remains
visible.

can someone please explain what i'm not understanding? here's the simple
code snippet:

protected void BtnNew_Click(object sender, EventArgs e)
{
FormView1.ChangeMode(FormViewMode.Insert);
TextBox txt1 = (TextBox)FormView1.FindControl("fldNameTextBox");
txt1.Visible = false;
}

thanks,
rodchar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top