4
Answers

How to assign current date to strongly typed date property in a view?

How to assign current date to strongly typed date property in a view in asp.net mvc 5?

I have tried

 

and 

@Html.TextBoxFor(model=>model.Dated,new {@class="form-control",@type="date", @value = DateTime.Now.ToString("MM/dd/yyyy") })

and also tried from controller

but these are not working

Please help me...

Answers (4)