Here we will see what will happen when we create a list
or a document library inside a site. You may create a list using the browser or you
may create a list using SharePoint 2010 server object model.
Here it is:
Whenever
you will create a document library SharePoint creates a folder with
same name as the document
library at the root of the web site.
Then
it creates another folder with name Forms. And SharePoint creates a set
of site pages like DispForm.aspx,
EditForm.aspx, AllItems.aspx, and Upload.aspx inside the Forms folder.
This pages are required to add
and manage content for that document library.
This site pages
can be accessible using SharePoint object model using the SPFile class
like below:
SPWeb site = SPContext.Current.Web;
SPFile sitepageAllItems = site.GetFile("[Document Library
Folder Name]/Forms/AllItems.aspx");
SPFile class has
different methods like Delete, MoveTo, CopyTo methods to work with site
pages. Suppose by using
Delete method you can delete the site page from the site.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.