Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

How to access the fields/data of the current page?

  Asked By: Reuben    Date: Feb 03    Category: Sharepoint    Views: 2803

What's the easiest/best way to access the data of the current page? I need to check if a value of a optional property is set or not from the codebehind of the page template (which inherits from PublishingLayoutPage).

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Addison Peck     Answered On: Feb 03

I'm assuming your referring to one of the site columns of the contenttype of your current  publishing page? You can use following code to get access  to a column in the current page.
SPContext.Current.File.Item["FieldName"]

 
Didn't find what you were looking for? Find more on How to access the fields/data of the current page? Or get search suggestion and latest updates.




Tagged: