"Mufasa" <jb@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Is there any real difference between using a hidden field and using a
label that is not visible. My thought being that I could leave the labels
visible while testing but make them invisible once I'm done. This way I
can see what is actually being stored in the values.
TIA - Jeff.
A couple of difference off the top of my head:
1. Hidden fields can be set client-side with javascript. I'm not aware of a
way to do that with labels. Especially not invisible labels (see 3).
2. Hidden field values are sent to the server as part of the POST data,
which makes them useful for cross-page postbacks.
3. Labels that are not "visible" are not rendered to the browser, hidden
fields are. Well, they're not rendered as HTML, they are in the viewstate
though.
Just curious, what is the point of storing values in invisible labels?