title: I want to Add Property Type and Sub Types in RadioButton using MVC
body: <p>I have Property Types and sub types that are stored in db, and i want to display these types and sub type in radiobutton.</p>
  
  <p>I m sharing some details.</p>
  
  <p><a href="https://i.stack.imgur.com/RDSAL.png" rel="nofollow noreferrer">DB Tables Image</a></p>
  
  <p>Here is ModelVM class</p>
  
  <pre><code>    public class PropertyVM
      {
        //property table
          public int property_id { get; set; }
          public string property_purpose { get; set; }
          public string property_sub_purpose { get; set; }
          public string address { get; set; }
          public string property_title { get; set; }
          public string property_description { get; set; }
          public Nullable&lt;double&gt; property_price { get; set; }
          public Nullable&lt;double&gt; property_budget { get; set; }
          public string property_land_area { get; set; }
          public string bedroom { get; set; }
          public string bathroom { get; set; }
          public Nullable&lt;int&gt; property_status { get; set; }
          public Nullable&lt;System.DateTime&gt; property_add_dateTime { get; set; }
          public string property_ad_expiry { get; set; }
  
          // property Type table
          public int property_type_id { get; set; }
          public string property_type_name { get; set; }
          public Nullable&lt;int&gt; property_type_status { get; set; }
  
          // property sub type table
          public int property_sub_type_id { get; set; }
          public string property_sub_type_name { get; set; }
          public Nullable&lt;int&gt; property_sub_type_status { get; set; }
  
          // for list of data
          public string Selected_pt_list { get; set; }
          public List&lt;property_type&gt; pt_list { get; set; }
          public string Selected_pst_list { get; set; }
          public List&lt;property_sub_type&gt; pst_list { get; set; }
  
  }
  </code></pre>
  
  <p>Here is Controller Method</p>
  
  <pre><code>[HttpGet]
          public ActionResult AddProperty()
          {
              PropertyVM obj = new PropertyVM();
              obj.pt_list = db.property_type.Where(pt =&gt; pt.property_type_status == 1).ToList();
              obj.pst_list = db.property_sub_type.Where(pst =&gt; pst.property_sub_type_status == 1).ToList();
  
              return View(obj);
          }
  </code></pre>
  
  <p>Here is UI Images</p>
  
  <p><a href="https://i.stack.imgur.com/E72sH.png" rel="nofollow noreferrer">WHen Select 1st ProertyType(Radiobutton) it shows all its child subTYpes </a></p>
  
  <p><a href="https://i.stack.imgur.com/S3OIZ.png" rel="nofollow noreferrer">WHen Select 2nd ProertyType(Radiobutton) it shows all its child subTYpes</a></p>
  
  <p><a href="https://i.stack.imgur.com/7GoLS.png" rel="nofollow noreferrer">WHen Select 3rd ProertyType(Radiobutton) it shows all its child subTYpes</a></p>
  
  <p><strong>NOTE : ALL PROPERTY TYPES AND SUB TYPES IN RADIO BUTTON, NOT CHECKBOX</strong></p>