Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use LabelFor in MVC 3

@Html.LabelFor(model => model.updateDate)

but this is transformed into <label for="updateDate">updateDate</label> and the value is not displayed just updateDate. How can I display the value?

like image 312
arnoldrob Avatar asked Jan 01 '26 03:01

arnoldrob


1 Answers

Try DisplayFor instead of LabelFor

@Html.DisplayFor(model => model.updateDate) 
like image 103
podiluska Avatar answered Jan 02 '26 15:01

podiluska



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!