Validator's ErrorMessage is decoded

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
:)
 
H

Harlan Messinger

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;."
 
J

Jacob Andersen

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top