Click to See Complete Forum and Search --> : Retrieving hidden post variables in c# (asp.net)


Aiysha
12-15-2005, 10:06 AM
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
Aiysha

Aiysha
12-15-2005, 10:32 AM
Never mind figured it out just use
Request["varaibleName"];
Duh!!! :rolleyes:
lol
Aiysha

raja37pn
10-18-2007, 09:30 AM
You only raised the question, after sometime you are the one answered for your question, whats this?

trepidity
11-13-2007, 05:15 PM
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.

lmf232s
11-13-2007, 05:48 PM
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

maxpfc
08-03-2010, 04:20 AM
You only raised the question, after sometime you are the one answered for your question, whats this?


It seems you're being a bit judjemental? Telling the guy he's "to quick to post" etc. Maybe this was something he was struggling with? He had the decency to come back and post the fact that he'd found an answer, AND POST THE SOLUTION. Thats the important thing. I was looking on the net for an answer and he answered my query. Posts are not just for the OP but for everyone that comes afterwards, such as myself. If they themselves come accross that answer so much the better. I find no fault in what he has done. On the contrary I'm grateful. Lets be nice to each other, I wouldn't like it if I took the time to post a question, researched the answer and then had someone telling me off.
Kind Regards
Shane Scott

#ALL YOUR BASE ARE BELONG TO US#