I want to use the OOTB calendar list view web part on my site, but the style does not match the theme we currently have. I need to make several changes, some of which include adding a header, changing background color and border.

I would like to avoid including styles/JavaScript into a content editor on the page for maintenance reasons.

So far I can think of 3 different options I have.

First option would be to create a wrapper web part that loads the OOTB calendar into my aspx page. This would be ideal as I can include the header I want, specify unique CSS classes and include a style sheet for this page only, all in one web part. But I don't know if it is possible to include a web part within a web part.

The second option would be to create a web part that inherits the calendar web part, then work with it there. I don't know if this is possible either because i believe those web parts are sealed. Reflection could be an option but I don't want to create the entire web part if I don't have to.

The third option would be to target that web part before the code is executed and sent to the page. The idea being to inject my own HTML around the web part before it loads on the page, complete with style sheet references.

Does anyone know if any of these methods are possible? or have a better idea?

1 Answer 1


This is the 2007 way to do it, but something like this. You can load the web part or web control inside of the 2010 web part and place it in a container which is styled.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.