C# C.NET输入名称因runat和masterpage而更改

C# C.NET输入名称因runat和masterpage而更改,c#,html,.net,C#,Html,.net,目前我得到了一个不可见输入字段的大列表,其中两个得到了runat=server。 由于runat=server和母版页,输入字段的名称会更改 见下面的代码/输出: ASP.NET代码 <input runat="server" id="_paymentAmount" type="hidden" /> <input type="hidden" runat="server" id="_shopperEmail" /> 我尝试过的其他解决方案: <asp:HiddenF

目前我得到了一个不可见输入字段的大列表,其中两个得到了runat=server。 由于runat=server和母版页,输入字段的名称会更改

见下面的代码/输出:

ASP.NET代码

<input runat="server" id="_paymentAmount" type="hidden" />
<input type="hidden" runat="server" id="_shopperEmail" />
我尝试过的其他解决方案:

<asp:HiddenField ID="paymentAmount" runat="server" ClientIDMode="Static" />
<asp:HiddenField ID="shopperEmail" runat="server" ClientIDMode="Static" />
但这两方面都是结果:

<input id="_paymentAmount" type="hidden" value="[VALUE]" name="ctl00$_cphContent$_paymentAmount">
<input id="_shopperEmail" type="hidden" value="[VALUE]" name="ctl00$_cphContent$_shopperEmail">
我想得到的结果如下:

<input id="_paymentAmount" type="hidden" value="[VALUE]" name="paymentAmount">
<input id="_shopperEmail" type="hidden" value="[VALUE]" name="shopperEmail">
有人知道如何解决这个问题吗?我不能接受paymentAmount和ShopperMail以外的其他名称。所以我能找到解决办法是很重要的

我尝试了其他控件,clientmode=Static


我正在使用ASP.NET 4.5

如果您只需要此字段来创建要发送到第三方页面的表单,请自己编写隐藏字段,并使用文本fe输入值

<input type="hidden" name="paymentAmount" value="<asp:HiddenField ID="paymentAmount" runat="server"  /> " />

您为什么只希望paymentAmount作为名称值?该值将在后端设置,并且对于adYen a支付服务,名称必须为paymmentAmount。相关:和
<input type="hidden" name="paymentAmount" value="<asp:HiddenField ID="paymentAmount" runat="server"  /> " />