How to Get a value from the current SharePoint 2010 pages Page Conent Type?
I am开发者_Python百科 looking to create a web part that will get the value of the consuming pages Page Content Type. For instance... I have a Page that has a custom Page Content Type that contains a column called ProductId. I would like to be able to access the value of the field from the web part. Can anyone steer me in the right direction?
Thanks for your help.
SPContext.Current.Item["ProductId"]
I'll take a stab without fully knowing the details. You can use SPMetal to create an entity class for your site/subsite and then use LINQ to SharePoint to get access to the data in the column.
精彩评论