Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Publishng Html Field

  Asked By: Cleveland Burch         Date: Dec 24, 2009      Category: Sharepoint      Views: 416
 

i have one publishing portal, my requirement is

How to retrive the data from the Publishing html field

i have created one site coloumn, field is Full HTML content publishing
here my req is.. How to retrive the data from this field.

Tagged:      

 

1 Answer Found

 
Answer #1       Answered By: Alicia Scott          Answered On: Dec 24, 2009       

Try following:

Microsoft.SharePoint.Publishing.Fields.HtmlField field  = (Microsoft.SharePoint.Publishing.Fields.HtmlField)list.Fields["YOURHTMLFIELDNAME"];

string strText = field.GetFieldValueAsText(list.Fields["YOURHTMLFIELDNAME"]);

string strAsHTML = field.GetFieldValueAsHtml(list.Fields["YOURHTMLFIELDNAME"]);

 
Didn't find what you were looking for? Find more on Publishng Html Field Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].