I just wanna ask if there's a possibility to change:
<input type="hidden" name="reference" value="ABC"/>
<input type="hidden" name="reference" value="any values I want"/>
<asp:HiddenField ID="reference" runat="server" Value="ABC" />
I know this is an old post, but for anyone looking to solve this issue now - If you add
runat="server" to the input, the name will be changed (e.g.
ClientIdMode="Static" will only help for the ID.
To get around this:
In your html page use a Literal :
<asp:Literal runat="server" ID="litInputAmount"></asp:Literal>
In the code behind file, assign a string to the Text attribute of the Literal This string should be the html as you would like it to be. The correct value can also be added for the value field:
litInputAmount.Text = String.Concat("<input id='inputAmount' type='hidden' name='amount' value='", Price.ToString(), "'>");
This will then be compiled as:
<input id="inputAmount" type="hidden" value="224.4" name="amount">
This will give the information to the payment gateway with the correct name, but your value can be managed dynamically. Repeat for any other values that need to be added before sending.