Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

IsIncluded

  Asked By: Grant Carpenter         Date: Aug 22, 2003      Category: Sharepoint      Views: 364
 

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();


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 IsIncluded Or get search suggestion and latest updates.


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