Required Field Validator with Safari 5.1

2019-06-26 05:48发布

问题:

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>

回答1:

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