Validator's ErrorMessage is decoded

  • Thread starter Thread starter Jacob Andersen
  • Start date Start date
J

Jacob Andersen

Hi

On a CustomValidator I have ErrorMessage="You cannot enter <, >, &lt; or
&gt;". When CustomValidator.IsValid is false the error message is
rendered as "You cannot enter <, >, < or >". How can I avoid this
decoding?

PS. Yes, I know the error message is stupid but it's needed in this case
:-)
 
Jacob said:
Hi

On a CustomValidator I have ErrorMessage="You cannot enter <, >, &lt; or
&gt;". When CustomValidator.IsValid is false the error message is
rendered as "You cannot enter <, >, < or >". How can I avoid this
decoding?

PS. Yes, I know the error message is stupid but it's needed in this case
:-)

That's interesting. Well, try "You cannot enter <, >, &amp;lt; or &amp;gt;."
 
That's interesting. Well, try "You cannot enter <, >, &amp;lt; or &amp;gt;."

Hi! Your suggestion renders:

"You cannot enter <, >, < or >."

Very strange! That means the ErrorMessage is double decoded. Does anyone
have a solution or hack to this problem?
 
Back
Top