Connecting Tech Pros Worldwide Help | Site Map

Valid html and > character within a button

vdex42@hotmail.com
Guest
 
Posts: n/a
#1: Dec 14 '05
Apologies if this has been asked before, but I haven't been able to
find the answer to this yet:

My problem is that .NET will not allow me to insert escaped '>'
characters (i.e. >) within the text property of asp buttons, it
seems to strip out only those type of characters, because other escape
codes DO work (eg. &quote;)

For example
<asp:button Runat=server text="test &gt;" ID=txtTest></asp:button>
Incorrectly produces:
<input type="submit" name="txtTest" value="test >" id="txtTest" />

But
<asp:button Runat=server text="test &quot;" ID=txtTest></asp:button>
Correctly produces
<input type="submit" name="txtTest" value="test &quot;" id="txtTest" />

I have tried to hack it to get my desired output, by inserting &amp;gt;
but &amp; is one of the codes it DOES keep, and faithfully renders
&amp;gt; instead of &gt; !

Has anybody found a workaround for this? or is there a fix for this?
(I am using the v1.1.4322 Framework)

Closed Thread