HighTechTalks DotNet Forums  

Validator's ErrorMessage is decoded

ASP.net ASP.net discussions (microsoft.public.dotnet.framework.aspnet)


Discuss Validator's ErrorMessage is decoded in the ASP.net forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jacob Andersen
 
Posts: n/a

Default Validator's ErrorMessage is decoded - 06-24-2010 , 04:22 PM






Hi

On a CustomValidator I have ErrorMessage="You cannot enter <, >, &lt; or
Quote:
". 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
:-)

Reply With Quote
  #2  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Validator's ErrorMessage is decoded - 06-25-2010 , 12:21 PM






Jacob Andersen wrote:
Quote:
Hi

On a CustomValidator I have ErrorMessage="You cannot enter <, >, &lt; or
". 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;."

Reply With Quote
  #3  
Old   
Jacob Andersen
 
Posts: n/a

Default Re: Validator's ErrorMessage is decoded - 06-27-2010 , 12:34 PM



In article <88k6t9FouhU1 (AT) mid (DOT) individual.net>,
hmessinger.removethis (AT) comcast (DOT) net says...

Quote:
On a CustomValidator I have ErrorMessage="You cannot enter <, >,
&lt; or
". 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;."
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?

Reply With Quote
  #4  
Old   
Sarath Babu S
 
Posts: n/a

Default Re: Validator's ErrorMessage is decoded - 07-08-2010 , 01:15 AM



Try this out:

CustomValidator I have ErrorMessage="You cannot enter <, >, &amp;lt; or
&amp;gt;"


Sarath Babu S
http://www.consultsarath.com/


"Jacob Andersen" <nej (AT) tak (DOT) dk> wrote

Quote:
Hi

On a CustomValidator I have ErrorMessage="You cannot enter <, >, &lt; or
". 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
:-)

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.