The only values which are sent back to the server are those contributed by enabled
<input>
,
<select>
,
<textarea>
, and
<button>
controls, as defined by
the HTML specification[
^].
The ASP.NET WebForms controls which need to submit information back to the server will generate one or more of these in the rendered HTML output.
Based on your ID prefixes, you're using an
<asp:Label>
. This does not submit any information back to the server. It simply renders a
<span>
, which does not contribute to the payload of the form.
You have several options:
You could replace the
<asp:Label>
with an
<asp:TextBox>
, and set it to "read-only". You would potentially need to apply CSS styles to make it look like you want.
You could intercept
the form's formdata
event[
^] and add the relevant value(s) to the submitted data. You would then need to read the values directly from the
Request.Form
collection on the server.
Or you could re-calculate the total on the server, using the prices loaded directly from the database. This would be the safest option, as it would prevent malicious users from modifying your form submission to reduce the price you charge them.