TextBoxFor @Value (uppercase) instead @value

前端 未结 3 1059
南旧
南旧 2021-02-15 17:49

This is just for curiosity

Why does this code work:

Html.TextBoxFor(x => x.Age, new { @Value = \"0\"})

and this doe

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-15 18:18

    I'm not 100% sure but, that could be value is a keyword in properties, readonly isn't. Look at properties from MSDN.

    enter image description here

    enter image description here

提交回复
热议问题