I have a bool in my ViewModel called DisableNextButton and I would like to use it to disable a button in my view. I should add that this button lives inside an if statement.
Ultimately, I'm trying to add the disabled attribute when DisableNextButton is true.
Here's my unsuccessful implementation:
@if(true)
{
<button type="button" @{ if (Model.DisableNextButton) { <text>disabled="disabled"</text> } } >Next</button>
}
I should note that this gives me a functioning enabled button.