Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I want to validate an RTE but I'm not quite sure what datatype it is.
For example, if I want to validate a textstring I do it like this:
<td data-title="Adress"> @if (!string.IsNullOrEmpty(school.adress)) { @school.adress } else { <text> </text> } </td>
But for an RTE, I can't use !string because it's not a string.
!string
How would the validation look like for RTE?
The RTE returns a IHtmlstring object.
So you need to do this :
<td data-title="Adress"> @if (!string.IsNullOrEmpty(school.adress.ToString())) { @school.adress } else { <text> </text> } </td>
Dave
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
What datatype is RTE?
I want to validate an RTE but I'm not quite sure what datatype it is.
For example, if I want to validate a textstring I do it like this:
But for an RTE, I can't use
!string
because it's not a string.How would the validation look like for RTE?
The RTE returns a IHtmlstring object.
So you need to do this :
Dave
is working on a reply...