title: Ho to display multiple checkbox selection based on user's selection from dropdown?
body: <p>I want to display a dropdownbox on my MVC3 razor application from where user can select category and based on his selection i want to display subcategories which are checkbox so user can select multiple subcategories.</p>
  
  <p>Can anyone help me how to get this?</p>
  
  <p>Below is my json that i received from the web-service and and I deserialized that to the object, so how can i assign that object to two different list category(dropdown) and subcategory (check-boxes)?  </p>
  
  <p>JSON:</p>
  
  <pre><code> {
   "Code":0,
   "Status":"Done",
   "Categories":[
   {
    "ID":1,
    "Name":"Eat",
      "Subcategories":[
          {"Flag":false,"ID":100,"Name":"Food"},
          {"Flag":false,"ID":101,"Name":"Fast Food"},         
          {"Flag":false,"ID":102,"Name":"Other"}
      ]
          },
      {
      "ID":2,
      "Name":"Entertainment",
       "Subcategories":[
          {"Flag":false,"ID":100,"Name":"All"},               
          {"Flag":false,"ID":101,"Name":"Movie"},
          {"Flag":false,"ID":102,"Name":"Other"}
      ]
    },
    }
    ]
    }
  </code></pre>
  
  <p>Entity:</p>
  
  <pre><code>public class MyData
  {
    public int Code { get; set; }
    public string Status { get; set; }
    public List&lt;Category&gt; Categories { get; set; }
  }
  
  public class Category
  {
    public string Name { get; set; }
    public int ID { get; set; }
    public List&lt;Subcategory&gt; Subcategories { get; set; }
  }
  
  public class Subcategory
  {
    public string Name { get; set; }
    public int ID { get; set; }
    public bool Flag { get; set; }
  }
  </code></pre>