How can I disable (show a greyed out button) in MVC if I am using an HTML.button ? I assume I can just do it the normal way in asp.net but wasn't sure.
was thinking something like this, I just don't have it right
<%
= Html.SubmitButton("SubmitAction",
"Update",
new {enabled =
"false"})%>
dba123
Contributor
2726 Points
1364 Posts
Disable button in HTML.Button helper
Apr 24, 2008 01:46 PM|LINK
How can I disable (show a greyed out button) in MVC if I am using an HTML.button ? I assume I can just do it the normal way in asp.net but wasn't sure.
was thinking something like this, I just don't have it right
<%
= Html.SubmitButton("SubmitAction", "Update", new {enabled = "false"})%>vecalion
Member
28 Points
11 Posts
Re: Disable button in HTML.Button helper
Apr 24, 2008 01:59 PM|LINK
If I remember (x)HTML, to disable button you need to write smth like:
<input type="submit" disabled="disabled" ... />
so try
<%= Html.SubmitButton("SubmitAction", "Update", new {disabled = "disabled"})%>