Click to See Complete Forum and Search --> : MS Access or ASP question - Text Formatting


mangofreak
12-06-2004, 07:33 PM
Hi,
I made a website using ASP and MS Access in the back-end. One of the functions of the website is to post some news by using a web based form. Copy, paste, submit and voila! It works fine, However, Since it is mainly text that is pasted on the form, I would like to be able to keep the original formatting of the text and not to have it displayed, as is now, all together without spaces. Can anyone tell me how to achieve that wonderfull thing. Is it an Access problem or an ASP thing?

Cheers,

MF

russell
12-06-2004, 07:48 PM
wrap the user input in <pre> </pre> tags

mangofreak
12-06-2004, 08:12 PM
Originally posted by russell
wrap the user input in <pre> </pre> tags

I Added the <pre>tags to the input tags but no change. Could you elaborate a little more? Please.

thanks
MF

russell
12-06-2004, 08:27 PM
Add the <pre> </pre> tags after the form is submitted.


Dim str
str = "<pre>" & Request.Form("MyTextArea") & "</pre>"

Response.Write str

...

<form method=post action="myPage.asp">
<textarea name="MyTextArea" rows=8 cols=32></textarea>
<input type=submit>
</form>