Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6673009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:34:36+00:00 2026-05-26T03:34:36+00:00

The formview has more than 1 Panels . My textbox is in the first

  • 0

The formview has more than 1 Panels. My textbox is in the first panel. If I use this

TextBox myTxtBox = (TextBox)myformView.Row.FindControl("pnlID").FindControl("mytextbox"); <- does not work

Panel mypanel = (Panel)myformView.Row.FindControl("pnlID"); <- this works
TextBox myTxtBox = (TextBox) FindControlRecursive(mypanel,'mytextbox'); <-- this does not work

Can someone help? As as side question, I used a function FindControlIterative but I do not know which references to include for LinkedList

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:34:37+00:00Added an answer on May 26, 2026 at 3:34 am

    The following works for me:

    Markup

    <asp:FormView ID="formView1" runat="server">
        <ItemTemplate>
            <asp:Panel ID="pnlID" runat="server">
                <asp:TextBox ID="mytextbox" runat="server"></asp:TextBox>
            </asp:Panel>
        </ItemTemplate>
    </asp:FormView>
    

    Code behind

    TextBox myTxtBox = (TextBox)FindControlRecursive(formView1,"mytextbox");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application I have TextBox in a FormView bound to a LinqDataSource like
I'm trying to use formview in order to do insert of a new entity
I have a FormView control in an ASP.NET page. I use the InsertItemTemplate and
I assume I am not the first one having this problem and I am
I'm using the FormView control in ASP.NET for a simple form to insert into
I have a FormView control in an ASP.NET 2.0 app. I've got the database
i am using formview and sqldatasouce. every thing is fine but when i have
I have a FormView with paging enabled. The FormView is bound to an EntityDataSource
I have an asp:FormView on a control (in an ascx file) which is loaded
I have an asp:FormView with an ItemTemplate. I'd like to design the content within

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.