Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

adding web parts to web part zone from code

  Asked By: Johnathan    Date: Nov 30    Category: Sharepoint    Views: 5499

Can anyone tell me how to add a Sharepoint "out-of-the-box" web part to an existing webpartpage's webpartzone from code (VS.net C#)?

I have developed an administrative web page (.net, c#) that creates an entire site collection structure based on many nested site (SPWeb) objects. I would like to add code to add various out-of-the-box web parts (eg: Announcements) to pre-defined webpartzones for certain SPWeb instances in my hierarchy. How can I do this? I don't want the site collection created from my script just to come up with empty web part pages and have to populate them all by hand...

Thanks for the help!



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on adding web parts to web part zone from code Or get search suggestion and latest updates.