views:

29

answers:

1

What are the difference between SPFile class and PublishingPage Class? I am trying to manipulate a SharePoint Page and I see that both SPFile and PublishingPage classes can be used and the only difference I see if PublishingPage is used for aspx file and SpFile can be used for anyfiles in a SharePoint site. I also see that there are few extra properties like ContactEmail etc in PublishingPage.

Is there anything important I am missing here?

+1  A: 

You pretty much answered your own question. the PublishingPage class is used to represent pages authored by end-users in a publishing site. It has information about the page layout used, the content type upon which the page layout was based, when the page should be published, and so on. The SPFile object is used to represent any file in a library.

Rob Windsor
Thanks Rob.....
Shoban