default checked radio button
<input type="radio" name="imgsel" value="" checked>
default checked radio button
<input type="radio" name="imgsel" value="" checked>
How to set the value to be selected of the radio button in mvc
BY LOVE
• Here , employee is an object and from that object we are fetching Gender property which is of string type.
@if (employee.Gender == "Male")
{
<input type="radio" name="Gender" value="Male" checked="checked" />
<text>Male</text>
}
else
{
<input type="radio" name="Gender" value="Male" />
<text>Male</text>
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us