Validate RadioButtonList using RequiredFieldValidator in ASP.Net

kankon
 
on Oct 29, 2021 04:07 AM
997 Views

hello,

when i try add Required Field Validator for RadioButtonList

i canl't update record when i want upload file download

i must select true to RadioButtonList

<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="true" BorderColor="#333333"
    BorderStyle="Solid" CssClass="auto-style199" ForeColor="Black" RepeatDirection="Horizontal"
    Style="font-size: large" TextAlign="Left" Width="92%" BackColor="#C0FFC0" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">
    <asp:ListItem Value="يداية">يداية</asp:ListItem>
    <asp:ListItem Value="نهاية">نهاية</asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="RadioButtonList1" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>

 

Download FREE API for Word, Excel and PDF in ASP.Net: Download