This article has some code for a control adapter that can be used for just that.
I does however not wrap webparts in divs, it only renders the webpart contents, which means any Chrom will be gone, as will those pesky tables that you might dislike.
If you like the tables and just want them rendered inside a DIV, which can useful for styling reasons. Then you can replace the line:
Obviously a better reason would be to make your own WebPartChrome implementation by inheriting from SPChrome, but since the Sharepoint class is sealed that is not really an option 🙁
Feel free to modify it as you like.
Leave a Reply