XHTML validation problems

  • Thread starter Thread starter vdex42
  • Start date Start date
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
 
if you set in the code behind with AddAttribute, you can control the
encoding.


-- bruce (sqlwork.com)
 
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

Back
Top