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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:52:57+00:00 2026-06-14T21:52:57+00:00

I have a table which uses a large number of form fields (the HTML

  • 0

I have a table which uses a large number of form fields (the HTML variety – i.e. without runat=server). When a postback occurs, these populate the Requests.Form object, and they appear to be inserted in the same order as they’re defined in the page HTML.

Is this behaviour documented and consistent across browsers? I’d like to be able to access the elements by index, which would provide a simple way to find the fields, given that they may be inserted or deleted on the client side.

Edit:

Each row in the table has a hidden field which contains the row ID. This field is named according to the order it was displayed at render time. e.g. the first row has a field like <input type="hidden" name="row0" value="RowID_555252" />, and so on.

Of course the row numbers will be wrong as soon as a row is inserted or deleted in the middle of the table, so the only solution I can think of is to use Javascript to update the row numbers of the entire table whenever the rows move about. The backend would then retreive rows in order by scanning Request.Form for row0, row1, etc until the element is NULL.

  • 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-06-14T21:52:58+00:00Added an answer on June 14, 2026 at 9:52 pm

    Is this behaviour documented …

    Yes it is.

    The overall algorithm is here: http://dev.w3.org/html5/spec/constraints.html#concept-form-submit and this defines that it uses a form data set built using the algorithm at http://dev.w3.org/html5/spec/constraints.html#constructing-the-form-data-set.

    While that algorithm is quite complicated, in essence it says that the form elements will be put into the form data set in node order. That’s not quite the same thing as what they were in the page HTML, for instance, the elements can be moved by JavaScript.

    There are further algorithms to turn the form data set into query strings or HTTP content but these too preserve the node order.

    There are known to be web pages that depend on this order. (The HTML5 parser has a strange quirk where input elements of most types, placed inside tables but not inside table cells are ejected from the table through a process known as foster parenting, but input elements of type “hidden” are not ejected in this way. This happens because that’s the only way to preserve the legacy submit ordering behaviour of browsers.)

    …and consistent across browsers?

    The whole algorithm of what gets submitted is definitely not consistent – for example, the submissions resulting from clicking on an input element of type “image” are known to vary significantly.

    I believe that the order of the submitted elements may well be consistent across browser implementations. However, I would not rely on it being so, and encourage you to find a more robust solution.

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

Sidebar

Related Questions

My ISPs server uses MySQL. I have a table which has a field with
i have a table which has many fields but i want to get count
I have a table which contains TV Guide data. In a simplified form, the
I have a table that contains temporary data which uses a column to store
I am unit/auto-testing a large application which uses MSFT Sql Server, Oracle as well
I have a table which uses a background image that is 1500px wide. Since
I have a SQL-Server 2008 database and a schema which uses foreign key constraints
I have a large number objects which are tree like structures. I have a
I have a table view which loads another xib file and uses the content
I have a code which creates html reports. It uses html tables to display

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.