Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

IsIncluded

  Asked By: Grant    Date: Aug 22    Category: Sharepoint    Views: 870

I am trying to add a web Part to a page in a program. I am able to
add the web part to the page. However, IsIncluded is always false.
Thus, the web part cannot be displayed. Any suggestions on this?

Thanks a lot,
Ricahrd


Code segment used for this:

SPSite mySiteCollection = new SPSite( siteURL );
SPWeb myRootSite = mySiteCollection.RootWeb;
SPWebPartCollection wpCollection = myRootSite.GetWebPartCollection(
aPageName, Microsoft.SharePoint.WebPartPages.Storage.Shared);

WebPart loginWP = new LoginWP.LoginWebPart();
loginWP.Title = "LoginWP";

loginWP.IsIncluded = true;
loginWP.IsVisible=true;
loginWP.Width="450px";

System.Guid guid = wpCollection.Add( loginWP );
wpCollection.SaveChanges( guid );

myRootSite.Update();

Share: 

 

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

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

Related Topics:



Tagged:  

 

Related Post