Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Adding a webpartpage programmatically

  Asked By: Amalraj    Date: Jan 19    Category: Sharepoint    Views: 1854

I want to add a webpart page programmatically to a top level site or a
subsite. How can I do it???? If anyone has clues....



4 Answers Found

Answer #1    Answered By: Clara Heath     Answered On: Jan 19

Get a copy of the WSS SDK and look for the "Web Part Pages Web Service" - there
are examples included there.

Answer #2    Answered By: Nisarg Kapadia     Answered On: Jan 19

but i couldnt locate what you are
reffering to and I am facing the same problem. adding  a web part pag
e by coe control is not present in the manual.....however adding a
web part "to" the web part page  is present. Any clues????

Answer #3    Answered By: Jaferry Khan     Answered On: Jan 19

i am doing it with the help of WSS SDK only. but, there is no help regarding
the issue I pointed out. Anyways thanx......

Answer #4    Answered By: Davin Knapp     Answered On: Jan 19

Look at the SPWebCollection object add  method.

The following e.g. shows how to add a sub webpartpage  to an existing

SPSite site  = new SPSite("http://[server]/sites/test");
SPWeb toplevelweb = site.OpenWeb();
SPWeb subweb = toplevelweb.webs.Add("Sub_Web_Name");

Didn't find what you were looking for? Find more on Adding a webpartpage programmatically Or get search suggestion and latest updates.