I have the following button:
<input type="button" id="btnNew" value="New Session" onclick="location.href='@Url.Action("NewSession","Telesales")'" />
how can I disable the button when my ViewBag is not null?
I have tried the following but it does not seem to work on input type button
<input type="button" id="btnNew" value="New Session" @((ViewBag.Session != null) ? "disabled" : "true") onclick="location.href='@Url.Action("NewSession","Telesales")'" />