Any option would have to be done client side as you cannot do this on the server without modifying the html form.
Modify the
name
to include theid
when the form is generatedname="firstname_1"
and extract it in the postback.Add fixed hidden inputs containing the
id
value:<input type="hidden" name="firstname_id" value="1">
Intercept the post and either set the value of a previously empty hidden input, or if as you say to don't care about the text-area content replace its value with its id.
<form name="frm" onsubmit="process();">
...
function process()
{
document.frm.firstname.value = document.frm.firstname.id;
}
Note that numeric id
s are only valid in HTML5.