Safari 5.1 的必填字段验证器
我在向导中使用必填字段验证器(下面的代码)和单选按钮列表,以确保用户在继续向导的下一步之前选择一个值。除 Safari 外,所有浏览器都可以正常工作。即使用户从单选按钮列表中选择了一个值,也会显示验证错误消息并且不允许用户继续。我不明白为什么会这样以及为什么它可能只适用于 Safari。
任何建议
<asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2">
Below are the results of your search, select a publication to continue or search again.
<br /><br />
<asp:RadioButtonList ID="rbl_publication" runat="server">
</asp:RadioButtonList>
<asp:RequiredFieldValidator ID="pub_list_valid" runat="server"
ControlToValidate="rbl_publication"
ErrorMessage="** Please select a publication">** Please select a publication</asp:RequiredFieldValidator>
<br />
<asp:Label ID="lbl_publications_no_data" runat="server"
style="font-weight: 700"
Text="Sorry...No publications are available for the selected criteria, please try again."
Visible="False"></asp:Label><br /><br />
</asp:WizardStep>
I'm using a Required Field Validator (code below) with a Radio Button List within a Wizard to ensure the user selects a value before proceeding to the next step of the wizard. This is working fine with all browsers except for Safari. Even when the user has selected a value from the Radio Button List the Validation Error Message is being shown and not allowing the user to proceed. I cannot figure out why this might be and why it might only be for Safari.
Any suggestions
<asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2">
Below are the results of your search, select a publication to continue or search again.
<br /><br />
<asp:RadioButtonList ID="rbl_publication" runat="server">
</asp:RadioButtonList>
<asp:RequiredFieldValidator ID="pub_list_valid" runat="server"
ControlToValidate="rbl_publication"
ErrorMessage="** Please select a publication">** Please select a publication</asp:RequiredFieldValidator>
<br />
<asp:Label ID="lbl_publications_no_data" runat="server"
style="font-weight: 700"
Text="Sorry...No publications are available for the selected criteria, please try again."
Visible="False"></asp:Label><br /><br />
</asp:WizardStep>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经在 safari 5.0.5 和 5.1(Windows)上进行了测试,它按预期工作。我猜你的问题与数据有关。您是否对出版物标题进行 html 编码?如果没有,那么您可能应该这样做。
希望这有帮助
I've tested on safari 5.0.5 and 5.1 (windows) and it works as expected. I'm going to guess that your issue is data related. Are you html encoding the publication titles? If not, then you probably should be.
Hope this helps