how to Pass Enum int value to controller
<p>I have enum in my model</p>

<pre><code>  public enum Months
    {
        January = 1,
        February = 2,
        March = 3,
        April = 4,
        May = 5,
        June = 6,
        July = 7,
        August = 8,
        September = 9, 
        October = 10,
        November = 11,
        December = 12
    }
</code></pre>

<p>View for display month names</p>

<pre><code> &lt;div class="left row"&gt;
    @using (Html.BeginForm("ViewDetails", "Employees", FormMethod.Post))
    {
        &lt;input type="hidden" id="UserId" name="UserId" value="@ViewBag.UserId" /&gt;
        &lt;div class="col-sm-4"&gt;
            &lt;div class="col-sm-6"&gt;
                @Html.DropDownList("SelMonth", new SelectList(Enum.GetValues(typeof(OSCTrackWeb.Models.AttendanceMaster.Months))), "Select Month", new { @class = "form-control" })
            &lt;/div&gt; 
            &lt;div class="col-sm-6"&gt;
                @Html.DropDownList("SelYear", Enumerable.Range(DateTime.Now.Year, 10).Select(x =&gt; new SelectListItem { Text = x.ToString() }), "Select Year", new { @class = "form-control" })
            &lt;/div&gt; 
        &lt;/div&gt;

            &lt;input class="btn btn-primary" type="submit" value="Filter" /&gt;
            &lt;input class="btn btn-info" type="button" value="Reset"    onclick="return Reset();" /&gt;

    }
&lt;/div&gt;
</code></pre>

<p>now i want the int value for the enum month selected from the form in controller</p>

<pre><code>    public ActionResult ViewDetails(int UserId, string currentFilter, int? SelMonth, int? SelYear, string searchString, int? Page_No)
    {

        int Size_Of_Page = 10;
        int No_Of_Page = (Page_No ?? 1);

        if (searchString != null)
        {
            No_Of_Page = 1;
        }
        else
        {
            searchString = currentFilter;
        }
        ViewBag.CurrentFilter = searchString;

        ViewBag.UserId = UserId;

        if (UserId != null) 
        {
            if (SelMonth == null &amp;&amp; SelYear == null)
            {
                SelMonth = DateTime.Now.Month;
                SelYear = DateTime.Now.Year;

                List&lt;AttendanceMaster&gt; amobj = db.AttendanceMasters.Where(s =&gt; s.EmpId == UserId &amp;&amp; s.AttendanceDate.Value.Month == SelMonth &amp;&amp; s.AttendanceDate.Value.Year == SelYear).ToList();

                    ViewBag.Name = LoggedUser.Name;
                    IPagedList&lt;AttendanceMaster&gt; lstdtl = amobj.ToPagedList(No_Of_Page, Size_Of_Page);
                    return View("ViewDetails", lstdtl);

            }
            else
            {
                List&lt;AttendanceMaster&gt; amobj = db.AttendanceMasters.Where(s =&gt; s.EmpId == UserId &amp;&amp; s.AttendanceDate.Value.Month == SelMonth &amp;&amp; s.AttendanceDate.Value.Year == SelYear).ToList();

                ViewBag.Name = LoggedUser.Name;
                IPagedList&lt;AttendanceMaster&gt; lstdtl = amobj.ToPagedList(No_Of_Page, Size_Of_Page);
                return View("ViewDetails", lstdtl);
            }
        }
        else
        {
            return null;
        }

    }
</code></pre>

<p>so how can i get int value like 1 for january, 6 for june etc.
help me</p>