How to change classes of a div element using Blazor

后端 未结 3 1106
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-07 05:20

I have a typical div element in a cshtml page in the form:

@(ErrorMessage)
3条回答
  •  有刺的猬
    2021-02-07 05:39

    Just like you would in regular Razor:

    @if (price>30)
    {
        

    The price is too high.

    }

    EDIT For updated question, I guess you want this:

提交回复
热议问题