Getting html in/out of a database

GregD

Newcomer
Joined
Jun 26, 2004
Messages
15
Ok call me silly here but i've never done this before, im currently making a portal/CMS. Ive done plenty of database selects inserts etc etc for ages, now ive come to the point in this new project where ive just realised something crucial... how on earth do i get the content in/out of the database as html?

I assume I have a textbox server control and insert the text in the database that the user has edited but how do i format it as html so rather than:

Hello!

It's:

<b>hello</b>

or whatever!

I want it to act like a normal text box but have say a bold button which makes selected text bold and can write that with <b> tags into a DB.

Please someone enlighten me ive been searching forums and my .net books this evening but havent found anything!
 
Last edited:
it sounds like you want to take html entered into a textbox and insert it into the database correct? Or do you want to take text entered into the text box and wrap html around it?

As for the database insert, I use sql parameters and I believe it will make any formatting changes that it needs to insert it into the database, you just need to tell it what datatype the input will be. If this sounds like what you need I can post some sample code for doing this.
 
Back
Top