So I have this code to disable an ASP.NET button server side and that part works but I also need to set CssClass on the same button to change the style onclick:
I am using:
Button1.Attributes.Add("onclick", "this.disabled = true;" + ClientScript.GetPostBackEventReference(Button1, null) + ";return false;this.CssClass = FormButtonFiltered;");
Which is not changing the CssClass. What code am I missing?