Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Publishng Html Field

  Asked By: Cleveland    Date: Dec 24    Category: Sharepoint    Views: 2650

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.



1 Answer Found

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

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.