Required Field Validation for Radio Button in asp.net c#
Loading
Required Field Validation for Radio Button in asp.net c#
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jignesh KumarRank #91 · 22.9K reputationPosted Mar 9, 2023, 12:00 AM EST
Hello Tarun,
Please refer this thread,
https://www.c-sharpcorner.com/UploadFile/rohatash/validating-radiobuttonlist-and-dropdownlist-using-javascript/
http://csharpexample.com/CsharpExampleSeeDetail.aspx?Did=37&CatID=22
Naimish MakwanaRank #324 · 7.7K reputationPosted Mar 9, 2023, 12:00 AM EST
Hello Tarun,
You can use the RequiredFieldValidator control.
Refer below link:
https://www.aspsnippets.com/Articles/RadioButtonList-Required-validation-using-RequiredFieldValidator-in-ASPNet.aspx
Thanks
Naimish Makwana
Jignesh KumarRank #91 · 22.9K reputationPosted Mar 9, 2023, 12:10 AM EST
Hello,
You can try this one if you wish to do in jquery,
$(function () { $('[Id*=btnSubmit]').on('click', function () { if ($('.radiobuttonname :checked').length == 0) { alert('Error: Please select a radio button!'); return false; } }); }); ' runat="server" /> C#or you can check live here,
https://codepen.io/prasanthmj/pen/eYWYGM
Naimish MakwanaRank #324 · 7.7K reputationPosted Mar 9, 2023, 12:11 AM EST
Please refer below link:
https://stackoverflow.com/a/34499262
https://meeraacademy.com/radiobutton-control-in-asp-net/
Thanks
Vishal YelveRank #178 · 13.6K reputationPosted Mar 9, 2023, 12:39 AM EST
Hi,
Please check this.
https://www.javatpoint.com/how-to-check-a-radio-button-using-javascript
TarunRank #6,374 · 268 reputationPosted Mar 9, 2023, 12:04 AM EST
I want Required Field Validation for RadioButton Not RadioButtonList
Vishal YelveRank #178 · 13.6K reputationPosted Mar 9, 2023, 5:52 AM EST
Hi Tarun,
You can try this
https://www.aspsnippets.com/Articles/Validate-Radio-Button-using-JavaScript.aspx