开发者

How to Get a value from the current SharePoint 2010 pages Page Conent Type?

开发者 https://www.devze.com 2023-04-01 01:07 出处:网络
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 c

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消