different between @Model and @model

前端 未结 2 944
名媛妹妹
名媛妹妹 2020-12-14 10:48

Basically I\'m doing a test caused by one of excpetion.

By using return View(list_a) in controller I passed a list into my view, On my View page, the co

2条回答
  •  自闭症患者
    2020-12-14 11:15

    @model denotes the type of a variable you refer as @Model

    @model string
    
    @Model.ToUpper(); // works as @Model is of type string
    

提交回复
热议问题