Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input format

Status
Not open for further replies.

colin81

Technical User
Jul 22, 2002
77
GB
Hi All,

Is there anyway to keep data entered within a text area in the same format when being passed from a textarea to another page or persistent storage? An example of my problem would be when a user enters the following into a textarea :

Hello,

Im Colin

Thanks

When posted to another page and output using a simple response.write the output is as below :

Hello, Im Colin Thanks

Is there anyway to get around this?

Many Thanks
Colin
 
the data in the text area is passed intact, you just need to put it in a viewable environment that will depict the formatting, such as another text area, or encased in <xmp> tags

in your example, if you view source of the page you displayed the input, it's in proper layout, if you HTMLEncode the input before displaying it, it will help with that issue.

[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top