【发布时间】:2015-06-04 06:26:19
【问题描述】:
在我的表单中,我需要插入“隐藏”类型的不同输入。 输入必须是带有“名称”和“ID”的 html 控件。因为我将此表单发送到外部 url。
对于验证,我在隐藏输入中执行 runat=server,然后我可以使用 requiredfieldvalidator。
但问题是当我在访问页面后查看源代码时,名称已更改。例如
<input type="hidden" name="hotelIdform" value="" runat="server" id="hotelIdform">
改为
<input name="ctl00$ctl00$Master_Body$child_center_content$hotelIdform" type="hidden" id="hotelIdform" value="b4ba78fc-0b62-4809-9dca-000972573139" />
我使用了 ClientIDMode="Static" ,只是 ID 没问题
请帮帮我
【问题讨论】: