Discussion Locked

WML : How to display "&" and "$" ?

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I perform a loop to add content from database to a string. Then after the loop is done, I will just Response.Write the string out. All the tags ie "

","

" and likes are being added in the process.
I keep hitting this error because of either the "&" or the "$". No matter how I Replace the string for "&" with "&s;" or "\&", or the "$" with "&dol;", it does not work.
Can somebody help me out? Thanks.

7 replies

by hasse mcse/brainbench

Hi!

I'm not to familiar with html, but it sounds like you might have to do it like this:

& = & in html code, so in order to get this in your html page when doing a response.write try adding & like: '&' into the string, if this dosen't work try '\&' and if that dosen't work try '\\&'.

One of theese three ways should work.
Same is for the $ &dol;.

/Hasse

by //.ichael g

I am assuming you are creating web content and it is the browser that you are getting the errors from.

The ampersand(&) is added with
&

$ should be ok.

by cedric king

I am creating WAP content. I had read before from some article that WML got problem with & and $ but I can't get any solution from that. Never mind, thanks for helping anyway.

by rrv

Try using char$(36) for $ and char$(38) for &. hope this gives a solution for you.

All the best

rvenkatesh@dubal.co.ae

This discussion is closed to new replies.