Conditional Html attribute using razor

前端 未结 4 1732
故里飘歌
故里飘歌 2021-02-12 14:46

I have a situation where I want to display a button as being enabled or disabled depending on a property which has been set on the view model.

@if (Model.CanBeDe         


        
4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-12 15:19

    You can use @Html.Raw to inject markup directly into elements

    
    

提交回复
热议问题