【问题标题】:Required Field Validator with Safari 5.1Safari 5.1 的必填字段验证器
【发布时间】:2011-08-30 19:35:30
【问题描述】:

我在向导中使用带有单选按钮列表的必填字段验证器(下面的代码),以确保用户在继续向导的下一步之前选择一个值。这适用于除 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>

【问题讨论】:

标签: .net validation safari requiredfieldvalidator


【解决方案1】:

我已经在 safari 5.0.5 和 5.1 (windows) 上进行了测试,它按预期工作。我猜你的问题与数据有关。您是否对出版物标题进行了 html 编码?如果不是,那么您可能应该是。

希望对你有帮助

【讨论】:

    猜你喜欢
    • 2013-03-23
    • 2011-11-24
    • 1970-01-01
    • 1970-01-01
    • 2010-11-26
    • 1970-01-01
    • 2011-07-16
    相关资源
    最近更新 更多