Skip to content
Loading
  
  •                       
  •               
  •           
  •   
  •       
  •     
    +1
  • Laxmidhar Sahoo
    0
    Hi
     
    Inside the row class div put both lable and edit box
     
    1. <div class="form-group row">  
    2. <label for="CourseName" class="col-sm-2 col-form-label">CourseName:label>  
    3. <div class="col-sm-8">@Html.EditorFor(model => model.CourseName, new { htmlAttributes = new { @class = "form-control", autofocus = "autofocus", placeholder = "CourseName" } }) // here it must next to the label and cant make it need help here please team.  
    4. div>  
    5. div>  
     
    Thanks and regards 
    0
  • -1

    Try using

    @Html.LabelFor(model => model.CourseName, htmlAttributes: new { @class = "control-label col-md-2" })
     
    or
     
    @Html.Label("CourseName", htmlAttributes: new { @class = "control-label col-md-2" })
     
    instead of Label, you can play with the size of col-md-2 based on your requirement.
    -1