Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

adding web parts to web part zone from code

  Asked By: Johnathan Hicks         Date: Nov 30, 2004      Category: Sharepoint      Views: 497
 

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!


Do you know someone who can help? Share a link to this thread on twitter, or facebook.

Tagged:                

 

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.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].