Guest User

Guest User

  • Tech Writer
  • 2.1k
  • 480.9k

How to create a new line using bootstrap in asp.net mvc checkboxFor?

Jul 1 2020 6:26 AM
Hi Team
 
I have create a new checkboxFor, the problem i cant create a new line using bootstrap class. To allow align of the new class. They seem scewed and have this below logic on my Razor in chtml. 
  1. // View  
  2.   
  3. <div class="form-group row">  
  4.                             <label for="Dietary requirement" class="col-sm-2 col-form-label">Dietary requirements</label>  
  5.                             <div class="col-sm-2">  
  6.                                 @Html.CheckBoxFor(model => model.DietMain.None)<label for="None">None</label>  
  7.                                   
  8.                             </div>  
  9.                               
  10.                             <div class="form-group row">  
  11.                               
  12.                                 @Html.CheckBoxFor(model => model.DietMain.Vegetarian, new { @class="col-sm-2" })  
  13.                                 <br/>  
  14.                                 <label for="Vegetarian">Vegetarian</label>  
  15.                                   
  16.                             </div>  
  17.                         </div>  

Answers (1)