I need to change the background colour of a button using C# code (Visual Studio 2008).
I saw some people recommending the inclusion of a directive: us
Although that property is technically available to all WebControls, it may be ignored for buttons (I haven't confirmed). This, of course, is assuming your project is ASP.NET. Having said that, if it DOES happen to work for you, I highly advise that you test this in other browsers as it may be MS specific.
From MSDN:
This property will render for only certain controls. For example, Table, Panel, DataGrid, Calendar, and ValidationSummary will render this property. It will also work for CheckBoxList, RadioButtonList and DataList if their RepeatLayout property is RepeatLayout.Table, not RepeatLayout.Flow.
Source: WebControl.BackColor Property
However, a more flexible and widely practiced method of achieving this is to use CSS.