how to make a radio button selected by default code example

Example 1: default checked radio button

<input type="radio" name="imgsel" value="" checked>

Example 2: radio by default selected

checked="checked"

Example 3: 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>
        }

Tags:

Misc Example