I want to disable a button when user clicks it. I could it, but I think my way was not good.
my way:
I set ViewBag.IsSaveButtonDisabled to true and check this container div by javascript then I disabled the save button. I know, it’s bad solution. I want to control my submit button’s disabled property on the sever side.
What is the best practice for it?
Add a new property to yourViewModel
Model
Controller
And in your View