Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How can i use FindControl method in asp.net?

Avatar of programmerist
programmeristFlag for Afghanistan asked on
.NET ProgrammingC#
6 Comments1 Solution988 ViewsLast Modified:
How can i use findControl and how can i get id's according to FindControl method? i need to get all TextBox data there are 40 textbox. And TextBoxid data...
i reall want to learn also linq method ;)
Loook please : http://i49.tinypic.com/2mfb4ew.png
  protected void Button1_Click(object sender, EventArgs e)
          //  SetRecursiveTextBoxAndLabels(PlaceHolder1);
            CreateForm creater = new CreateForm();
            creater.Holder = PlaceHolder1;

            if (PlaceHolder1.Controls.Count > 0)
                foreach (Control item in PlaceHolder1.Controls)
                    item.FindControl(item.ID) is TextBox-------> How can i control is textBox?  Because there are labels grid....


    ENG_ACCESS engAccess = new ENG_ACCESS();
            Type engTyp = engAccess.GetType();
            PropertyInfo[] properties = engTyp.GetProperties();

            TextBox txtbox = new TextBox();

            foreach (PropertyInfo strColumn in properties)
                  txtbox = (TextBox)Page.FindControl("txt" + strColumn.Name);
Avatar of crisco96
crisco96Flag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answers