Niyazi Toros

Niyazi Toros

  • NA
  • 41
  • 6.4k

How to align disabled item in cshtml page?

May 27 2016 2:25 AM

Hi,

After I disable the "@Html.EditorFor" item in cshtml page I cannot align the item as shown below. How do I alaign the disabled item?


Here is my code;
 
  1. <div class="form-group">  
  2.   
  3. @Html.LabelFor(model => model.CustomerActive, htmlAttributes: new { @class = "control-label col-md-2" })  
  4.   
  5. <div class="col-md-10">  
  6.   
  7. <div class="checkbox">  
  8.   
  9. @Html.EditorFor(model => model.CustomerActive, new { htmlAttributes = new { disabled = "disabled", @readonly =  
  10.   
  11. "readonly", @class = "form-control" } })  
  12.   
  13. @Html.ValidationMessageFor(model => model.CustomerActive, ""new { @class = "text-danger" })  
  14.   
  15. </div>  
  16.   
  17. </div>  
  18.   
  19. </div> 
 

Answers (2)