469,609 Members | 1,268 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

How to write html tags onto a page ????

OK i know it sounds little bit wierd but here is what i have to do. I have a
database in which i store questions and answers, but the questions are about
HTML, Javascript, ASP...... So i store into my database a question like
'How do you make a letter/word in HTML bold?

Now i put the answer
<b></b>
Now i have to write out the answer
but when i do this it dosent write out on the page as it is HTML.
I know that it should be written to the db as
&lt;b&gt;&lt;/b&gt; but how can i do this???


Nov 24 '05 #1
2 1621
> &lt;b&gt;&lt;/b&gt; but how can i do this???
I mean, the person that fills in the questions and answers fills them as
they are
<b></b> not &lt;b&gt;&lt;/b&gt; so what i wonted to know is how to
transform
<b></b> to &lt;b&gt;&lt;/b&gt;
or if anybody has other ideas???
"polilop" <fm******@inet.hr> wrote in message
news:Oi*************@TK2MSFTNGP15.phx.gbl...
OK i know it sounds little bit wierd but here is what i have to do. I have
a database in which i store questions and answers, but the questions are
about HTML, Javascript, ASP...... So i store into my database a question
like
'How do you make a letter/word in HTML bold?

Now i put the answer
<b></b>
Now i have to write out the answer
but when i do this it dosent write out on the page as it is HTML.
I know that it should be written to the db as
&lt;b&gt;&lt;/b&gt; but how can i do this???

Nov 24 '05 #2
Found it
Response.write(Server.HTMLEncode("<b></b>"))

"polilop" <fm******@inet.hr> wrote in message
news:Om**************@TK2MSFTNGP15.phx.gbl...
&lt;b&gt;&lt;/b&gt; but how can i do this???

I mean, the person that fills in the questions and answers fills them as
they are
<b></b> not &lt;b&gt;&lt;/b&gt; so what i wonted to know is how to
transform
<b></b> to &lt;b&gt;&lt;/b&gt;
or if anybody has other ideas???
"polilop" <fm******@inet.hr> wrote in message
news:Oi*************@TK2MSFTNGP15.phx.gbl...
OK i know it sounds little bit wierd but here is what i have to do. I
have a database in which i store questions and answers, but the questions
are about HTML, Javascript, ASP...... So i store into my database a
question like
'How do you make a letter/word in HTML bold?

Now i put the answer
<b></b>
Now i have to write out the answer
but when i do this it dosent write out on the page as it is HTML.
I know that it should be written to the db as
&lt;b&gt;&lt;/b&gt; but how can i do this???


Nov 24 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Mike Daniel | last post: by
71 posts views Thread by tomy_baseo | last post: by
8 posts views Thread by Steve | last post: by
12 posts views Thread by Sean | last post: by
11 posts views Thread by Michael Powe | last post: by
4 posts views Thread by Neil.Smith | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.