Possible Duplicate:
Adding css class through aspx code behind
Im trying to assign a css-class to button created in a overridden CreateChildControls-method like this:
HtmlButton btn = new HtmlButton();
btn.ServerClick += new EventHandler(resultSelected);
btn.InnerText = "btn text";
btn.Attributes.CssStyle.Remove("class");
btn.Attributes.CssStyle.Add("class", "submitbutton");
this.Controls.Add(btn);
PlaceHolder1.Controls.Add(btn);
But I guess I need to specify my stylesheet-file for it to work...I want to use the same one as in the aspx.