Friday, June 26, 2015

Ektron Smart Forms - rich text field outputs as "Rich"

When using the XSD output of an Ektron smart form and converting this to a C#/VB class, rich text content will generally output as the string "Rich". This is because rich text is not a standard .NET data type, and it will need a small fix to work correctly. In the class file (generated by XSD.exe) look for the rich class - "public partial class rich".

We are going to add in the following ToString extension which will give us the correct rich text.
Simply add in the "public override string ToString()" method and the rich text will begin to render correctly.

No comments:

Post a Comment