Skip to content
Loading
why ActionResult method parameter is null in asp.net MVC?  
  •                       
  •                   
  •    
  •                 class="row">  
  •                     class="col-sm-12">  
  •                         class="form-group">  
  •                             @Html.LabelFor(m => m.PersianTranslate)  
  •                             @Html.TextAreaFor(m => m.PersianTranslate, new { @class = "form-control", @placeholder = "Persian Translation" })  
  •                             @Html.ValidationMessageFor(m => m.PersianTranslate)  
  •                           
  •                       
  •                   
  •    
  •                 class="row">  
  •                     class="col-sm-12">  
  •                         class="form-group">  
  •                             @Html.LabelFor(m => m.Examples)  
  •                             @Html.TextAreaFor(m => m.Examples, new { @class = "form-control", @placeholder = "Examples" })  
  •                             @Html.ValidationMessageFor(m => m.Examples)  
  •                           
  •                       
  •                   
  •                 @Html.HiddenFor(m => m.Id)  
  •                 class="form-buttons-w">class="btn btn-primary" type="submit"> Save  
  •             }  
  •           
  •       
  •       
  •   
  • ==============================  
  •    
  •    public class Vocabulary  
  •     {  
  •    
  •         public int Id { getset; }  
  •         [Required]  
  •         public string Word { getset; }  
  •         [Required]  
  •         public string Defination { getset; }  
  •         [Required]  
  •         public string Synonym { getset; }  
  •         [Required]  
  •         public string PersianTranslate { getset; }  
  •         [Required]  
  •         public string Examples { getset; }  
  •     }  
  •  

    1 Reply

    Know the answer? Post it — somebody with the same question will find it here.