Annoying ASP Issue

Soldato
Joined
8 Oct 2005
Posts
4,184
Location
Midlands, UK
Have an annoying asp issue here. I basically have a table with a few fields and a memo field for some large text, am using a Access db.

If i try to display this memo field in a text area (i have an edit record page), i get nothing at all. If i print this directly to a page it works fine. Other fields are displaying fine in input fields.

I'm using the following (have tried setting the below value to a variable and still get nothing). Setting the cols/rows of the textarea to a higher value doesn't work either.

Code:
<textarea cols="50" rows="10" name="newsBody"  value="<%=objRS.Fields("newsBody")%>" ></textarea>
 
Last edited:
So if you assign objRS.Fields("newsBody") to a string, and cast it as such using the Cstr function, then print it to screen (response.write), it doesn't display anything? Does the memo field contain any control characters such as carriage returns or line feeds?
 
Hi,

Code:
<textarea cols="50" rows="10" name="newsBody"><%= objRS.Fields("newsBody").Value %></textarea>

It's a textarea not a input type so it doesn't use the same value="" the value goes in between the opening and closing tags for the textarea.
 
from the example above, the way i read it, he isn't doing that anyway. He's got his opening textarea tag, then his value, following by the closing textarea tag.
 
So if you assign objRS.Fields("newsBody") to a string, and cast it as such using the Cstr function, then print it to screen (response.write), it doesn't display anything? Does the memo field contain any control characters such as carriage returns or line feeds?

Hi,

Code:
<textarea cols="50" rows="10" name="newsBody"><%= objRS.Fields("newsBody").Value %></textarea>
It's a textarea not a input type so it doesn't use the same value="" the value goes in between the opening and closing tags for the textarea.

A combinations of both of those worked.

I changed the code to the below and it displayed correctly. Thanks

Code:
<textarea cols="50" rows="10" name="newsBody"><%=Cstr(objRS("newsBody"))%></textarea>
 
Back
Top Bottom