Disable Chrome in C# Sharepoint 2007 Webparts
I create a lot of custom webparts for SharePoint 2007. One slightly annoying thing is remembering to turn of the Chrome when adding webparts to pages. It can also be a problem when your advanced clients who are adding webparts forget to to disable the Chrome.
In your c# webpart class slap in the following code to automatically disable Chrome. You can’t even select anything other than Chrome so be careful.
public override PartChromeType ChromeType
{
get {
return base.ChromeType;
}
set {
base.ChromeType = PartChromeType.None;
}
}