If you want to add custom CSS file for your webpart, here is the code:
-
protected override void CreateChildControls()
-
{
-
base.CreateChildControls();
-
cssLink.DefaultUrl = “/_layouts/Test.css”;
-
this.Page.Header.Controls.Add(cssLink);
-
}