Retrieving hidden post variables in c# (asp.net)

liunx

Guest
Can ny1 plz help
i need to retrieve hidden and posted elements in c# does ny1 know hw to do that.

e.g.

<form action="payment.aspx" method="post">
<input type="hidden" name="auth" value="0123456789"/>
</form>

hw do i retrieve them in the payment.aspx page? I need the value of auth
Thanks in advance to ny1 who can help
AiyshaNever mind figured it out just use
Request["varaibleName"];
Duh!!! :rolleyes:
lol
AiyshaYou only raised the question, after sometime you are the one answered for your question, whats this?Seems you were a little too quick to post. Form variables are always referenced by the name attribute. Doesn't matter if the user can actually see it drawn on the screen its still there like any other field. Only slight exception is an array of fields, but the array name is still the name attribute.You can also go about it this way which is more or less the exact same thing you have but again its another option.


<asp:HiddenField ID="hidCustomerId" runat="server" Value="" />

Dim CustomerId as String = Me.hidCustomerId.Value
 
Back
Top