Can I make any ASP.NET/HTML element into form-data that posts back to the server?
Posted
by Giffyguy
on Stack Overflow
See other posts from Stack Overflow
or by Giffyguy
Published on 2010-04-24T05:57:03Z
Indexed on
2010/04/24
6:03 UTC
Read the original article
Hit count: 345
I am using Javascript to alter the innerHTML attribute of a <td>
and I need to get that info back in the form submittal. The <td>
corrosponds to an <asp:TableCell>
on the server-side, where the Text attribute is set to an initial value.
The user cannot enter the value in this particular field. Instead, its value is set by me (via client-side script) based on actions that the user performs. But this field is useless to me if I can't see its value on the server-side as well.
I'd like to avoid using a read-only textbox, because those are difficult to resize dynamically. Can an <asp:Label>
be used as form data? Is there any way to achive this without letting the user manually enter the data? Or is there a simpler way to store a string as a variable somewhere and send it back as form-data?
© Stack Overflow or respective owner