Readonly Content

A screenshot of an example Readonly Content field from the trellispark Features Demo application, showing styled blue text on a transparent blue background. Links are highlighted in green.

This component is used to display content in a field that cannot be modified. The content displayed can either be static (defined in the field definition) or be returned from a target call. The content is displayed as a MarkupString so raw HTML/CSS is supported. The content can also be displayed as an iFrame, in which case the static or Target content must be the URL for the iFrame.

Component Code

The first section of the code region contains the standard parameters and the variables needed for the component to function.

OnParametersSetAsync()

This method is called when the component is loaded or updated. Its purpose is to pull the content from the specified location based on the Content Type and display the content in the field.

Task<string> CallReadonlyTarget()

This method is used to call a target to get a result that can either be the URL for an iFrame or raw HTML/CSS.

Updated on October 31, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment