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 6960563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:25:04+00:00 2026-05-27T15:25:04+00:00

Here’s an odd situation. In my FormView control, I put a <table> for layout.

  • 0

Here’s an odd situation. In my FormView control, I put a <table> for layout. With the rows (<tr>) I added IDs and runat="server". The insert only saved some of the data, which I thought was odd. I looked to see why those fields stored and others didn’t, and the only difference was I hadn’t added the IDs or runat="server" to the <tr>s. Removing the “runat” allowed the insert to work normally.

I assume this has something to do with the way the rows are initialized versus when the control or FormView is initialized. Any thoughts why this happens? For now, I’m removing the IDs from the table rows.

  • 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-27T15:25:05+00:00Added an answer on May 27, 2026 at 3:25 pm

    You’re on the right track in your thinking.

    The FormView only looks at top-level controls. If you embed one of your intended input controls inside of another server-side control, the FormView doesn’t see it (it’s been hidden inside the outer control). Even in your code-behind you’d have to use the FindControl method to get the input tag out of the server-side <tr>

    Thus, if you had this:

    <tr ID="row1" runat="server">
        <asp:TextBox ID="myTB" runat="server">12</asp:TextBox>
    </tr>
    

    The only thing the FormView sees is the top-level element (the <tr>). You wouldn’t even see the TextBox in your codebehind unless you did this:

    TextBox myTB = (TextBox)row1.FindControl("myTB");
    

    So my suggestion would be to leave off the “runat” and “ID” tags from the <tr> elements; since they are just for display purposes, you don’t really need them at the server-side.

    I hope that clears things up a little.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's an example query: DECLARE @table table (loc varchar(10)) INSERT INTO @table VALUES ('134a'),
Here is a simplification of my database: Table: Property Fields: ID, Address Table: Quote
Here's an interesting problem. On a recently installed Server 2008 64bit I opened IE
here is my configuration: http://domain.com (obviously fictitious name...) hosted on a server running Apache
Here is the situation, I am attempting to fire a set of Gallio tests
Here is my situation: I am using telerik with winform. I have a dataset
Here's a basic regex technique that I've never managed to remember. Let's say I'm
Here's a problem I ran into recently. I have attributes strings of the form
Here is the issue I am having: I have a large query that needs
Here's my scenario - I have an SSIS job that depends on another prior

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.