Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How many hidden field controls on a page is to many?

Status
Not open for further replies.

iwease

IS-IT--Management
Sep 4, 2006
104
CA
I'm thinking of a way to solve a problem with a treeview. One way I can solve it is by adding a hiddenfield for each node. I could end up with many hidden fields on the page (the tree could have thousands of nodes but it is safe to assume that they will not all be visible or even loaded at the same time).

The alternative is to have one or two hidden fields, and store the IDs of the tree nodes (for the ones I need) in the fields, and then use regular expressions, or split, or something on the server to extract the nodes
 
iwease said:
I'm thinking of a way to solve a problem with a treeview...
???
i think your started typing half way through your idea. Without knowing what your problem is we can't comment on whether your approach is feasable or not.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
haha..yeah, I was thinking I should have left that out because it was confusing. What I meant was how many hidden fields on a page can I have before it becomes slow and cumbersome (ie, when does document.getElementById(), etc all slow down) ?
 
it's not so much about the amount of controls as it is the amount of data.

for instance the hidden field for viewstate is only 1 control, but this can make or break page size due to the amount of data stored on the page.

also, HTML tables are considered bigger objects to a browser than span or div tags. so a page with 500 rows is considered bigger (or logner to process) than a page with 500 div tags.

If your worried about too much information on a single page you may want to consider breaking the information out into seperate steps (wheter you use a wizard control, multiple panels/user controls, or even multiple pages) this would reduce the amount of data transmitted.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
I see. If my hidden fields are only storing a 1 or 0, that is not a whole lot of information, but, it sounds like its speed is going to be dependent on the user's machine/server. Any ball park figure of a number of this controls that is approaching too much. 1000 perhaps? I guess I should probably just create a little test app myself and see.
 
In the 2.0 framework the treeview control has a populateondeman property, this may be what you are looking for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top