I have a Ajax.BeginForm in my razor view. I want to have 3 check boxes.

  1. Begineer
  2. Intemidiate
  3. advance

checkoxes can select for any combination. When I clicked submit button bellow method in my controller will triggered.

public PartialViewResult SearchCourseCriteria(){

        var courses = from s in db.CourseCategories
                      select s;
        return PartialView("_Courses", courses);

}

This is my view

 @using (Ajax.BeginForm("SearchCourseCriteria", new AjaxOptions
    {
       UpdateTargetId = "CourseList",    
       InsertionMode = InsertionMode.Replace,  
       HttpMethod = "GET"
    }))
    {
        td>
           @Html.CheckBoxFor()                                        
        </td>

        <td>
           <input type="submit" value="Search" class="btn " />
        </td>

   }

In my model there is field called CourseLevel. I want to know How to filter courses according to the selected checkboxes. EX : If I select begineer and Intermidiate checkboex. I want to get all courseCategories from that levels. I dont know how to get that result. Help please.

Related posts

Recent Viewed