XHTML validation problems

V

vdex42

I would like to have a button with the text "Next >". The problem is,
that the > character isn't valid in an attribute of an XHTML node, and
& g t ; should be used instead(Please note I am adding extra spacesso
that this post is readable!)

I have tried <asp:button Runat=server ID=test Text="Next & g t ;">
And <asp:button Runat=server ID=test Text="Next & a m p ; g t ;"> But
neither of them render as & g t ;

Any Advice would be appreciated,

Thanks in advance,
Ivan
 
B

Bruce Barker

if you set in the code behind with AddAttribute, you can control the
encoding.


-- bruce (sqlwork.com)
 
V

vdex42

Thanks for responding.

Ouch, do I understand correctly that the only way to do this would be
to write my own button control then?

Is there a reason why .NET will not HTML encode the > character then? I
still find it bizarre that it will leave my & q u o ; alone, but
replace the & g t ; with a >

Thanks,
Ivan
 

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,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top