Skip to content
Loading
Error message is getting wrapped  
  •   
  •   
  •                              
  •                               
  • Sachin Singh
    Test my approach and let me know
  • Hi All

     

      Trying like below but not working


                                @Html.LabelFor(model => model.Id, htmlAttributes: new { @class = "control-label col-md-3" })
                               

                                    @Html.EditorFor(model => model.Id, new { htmlAttributes = new { @class = "form-control", @Value = Model.Id } })
                                   

                                        @Html.ValidationMessageFor(model => model.Id, "", new { @class = "text-danger" } )
                                   

                               

                           

    Thanks 

  • Hi Satya
     
      Still same problem
     
    Thanks 
  • Hi Satya
     
      Now it is printing Text Box first & then Label
     
    Thanks 
  • Satya Karki
    Can you try this and share me your output snap.
     
    1. class="form-group row">    
    2.                         
    3.                       @Html.LabelFor(model => model.Id, htmlAttributes: new { @class = "control-label" })    
    4.                       class="col-md-3">    
    5.                           @Html.EditorFor(model => model.Id, new { htmlAttributes = new { @class = "form-control", @Value = Model.Id } })      
    6.                       
        
  • class="col-md-12">    
  •                       @Html.ValidationMessageFor(model => model.Id, ""new { @class = "text-danger" })  
  •         
  •                       
  •  
  • Hi Satya
     
      Not working
     
    Thanks 
  • Satya Karki
    HI,
     
    can you try this and let me know your output.
     
    1. class="form-group row">  
    2.                       
    3.                       @Html.LabelFor(model => model.Id, htmlAttributes: new { @class = "control-label" })  
    4.                       class="col-md-3">  
    5.                           @Html.EditorFor(model => model.Id, new { htmlAttributes = new { @class = "form-control", @Value = Model.Id } })    
    6.                       
      
  •                       @Html.ValidationMessageFor(model => model.Id, ""new { @class = "text-danger col-md-12" })  
  •                     
  •