say I have this in my database:
<script> Hello world </script>
<br>
<h1> Johny apple seed </h1>
a;sldfjaslkjdflkasdjf
when I try this:
Code:
itemData ="<script> Hello world </script><br><h1> Johny apple seed </h1>a;sldfjaslkjdflkasdjf"
dItem.InnerHtml = Server.HtmlDecode(itemData)
I get this:
Johny apple seed
a;sldfjaslkjdflkasdjf
which is what I'm looking for. However, I also get a javascript error because of the <script> hello world </script>
Is there anyway to get what I want without getting a javascript error?
I tried this:
Code:
dItem.InnerText = Server.HtmlDecode(itemData)
Then I'll get
<script> Hello world </script> <br> <h1> Johny apple seed </h1> a;sldfjaslkjdflkasdjf
which is fine, but not exactly what I want...
Any ideas?
thanks.