Frage

I've got a List and a Document Library. Both have their own content types. In those content types is a site column, a multiline one with Rich Text.

In this column, I'm coding a simple link with html markup.

The custom list displays a clickable hyperlink like this "GOOGLE" which is alright.

The Document Library, however, displays the code with the html markup.

How is this possible, provided the column is the same used in both content types?

How can I fix this in the document library?

War es hilfreich?

Lösung

Found how to resolve this matter :

SPField field = myList.Fields["MultilineColumn"]; 

SPSecurity.RunWithElevatedPrivileges(delegate()
{
    oWeb.AllowUnsafeUpdates = true;
    (field as SPFieldMultiLineText).RichText = true;
    field.Update();
    oWeb.AllowUnsafeUpdates = false;
});

//Then add html to the multiline column. 
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit sharepoint.stackexchange
scroll top