473,796 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1728
> &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******** *****@TK2MSFTNG P15.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.HTMLEnco de("<b></b>"))

"polilop" <fm******@inet. hr> wrote in message
news:Om******** ******@TK2MSFTN GP15.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******** *****@TK2MSFTNG P15.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2152
by: BCS | last post by:
I have a web site in which the site administrator can input information to a database through a web form. The information then gets displayed on ASP pages. One field is a large text field. Of course, without html tags, the text gets displayed on the web page as one long paragraph since the database doesn't store any line breaks or paragraph breaks. The obvious solution (to me) is to use html tags like <br> in the input. However, while...
6
12988
by: Mike Daniel | last post by:
I am attempting to use document.write(pageVar) that displays a new html page within a pop-up window and the popup is failing. Also note that pageVar is a complete HTML page containing other java scripts. Being a javascript newbie and after significant testing, I suspect that the document.write fails after finding a </script> within pageVar. Does a trick exist that enables one to slightly alter pageVar whereby enabling...
71
6510
by: tomy_baseo | last post by:
I'm new to HTML and want to learn the basics by learning to code by hand (with the assistance of an HTML editor to eliminate repetitive tasks). Can anyone recommend a good, basic HTML editor that's a step beyond Notepad (not a WYSIWYG tool). Thanks.
8
6998
by: Steve | last post by:
Hi; I'm making an HTML screen that I would like to print on a single page: http://www.geocities.com/beforewisdom/Tech/Archive/ebnfNotation.html Doing a print preview with Mozilla 1.6 on Debian I can see this will not happen. I could take out some of the blank lines, but I think that would make
12
2870
by: Sean | last post by:
Hi, I have the following script: ----------------------------------------------------------------------------------- <script type="text/javaScript"> <!-- document.write('<div id=hello1>Hello1</div>'); document.write('<div id=hello2 style="display:none;"><script src="test.js"><\/script></div>');
8
9421
by: '69 Camaro | last post by:
Perhaps I'm Googling for the wrong terms. Does anyone have links to examples of the syntax necessary to read the HTML on another Web page when that HTML is produced from JavaScript using the document.write( ) method? For a simplified example, I have two Web pages. Page 1 uses JavaScript with the following: htmlData = "<B>This is bold text.</B>"; document.write(htmlData);
11
3113
by: Michael Powe | last post by:
How can I make an XHTML-compliant form of an expression in this format: document.write("<scr"+"ipt type='text/javascript' src='path/to/file.js'>"+"</scr"+"ipt>"); this turns out to be a non-trivial exercise. inserting '&lt;' and '&gt;' causes the browser to write the text to the page as literal text rather than as the intended script element. Using escape codes seemed to work (makes it standard compliant) but the text is not written to...
4
6844
by: Neil.Smith | last post by:
I can't seem to find any references to this, but here goes: In there anyway to parse an html/aspx file within an asp.net application to gather a collection of controls in the file. For instance what I'm trying to do is upload a html file onto the web server, convert it to aspx file and then parse it for input tags/controls, which in turn will become fields in a newly created database table. Clearly when the aspx file is called the...
0
10467
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10244
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10201
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7558
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4130
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.