c# - How to Get the Integer Value of the Month? -
i'm working mvc3.i'm using dropdownlist select month using following code,
<select id="mth" class="dropdown"> <option>jan</option> <option>feb</option> <option>mar</option> <option>apr</option> <option>may</option> <option>jun</option> <option>jul</option> <option>aug</option> <option>sep</option> <option>oct</option> <option>nov</option> <option>dec</option> </select>
i want pass integer value of corresponding month controller.for example if choose 'jan' value '1' should passed controller.how can that?
you can add value attribute options
<select id="mth" class="dropdown"> <option value="1">jan</option> <option value="12">dec</option> </select>
Comments
Post a Comment