PDA

View Full Version : HTML Encode Text Area?


Crash1hd
06-10-2003, 08:09 PM
Ok the following code works fine

<input id="MNameField" maxlength="100" name="MNameField" size="30" value="<% = Server.HTMLEncode(MNameField) %>">

cause its a text field

but the following does not!

<textarea cols=40 name=DetailsField rows=6 wrap="VIRTUAL" value="<% = Server.HTMLEncode(DetailsField) %>"></textarea>

raf
06-10-2003, 09:02 PM
textareas don't have a value. You need to include the value from the sessionvar between the textarea start and end tag. Like
<textarea name="textareaName" cols="40" rows="4"><%= session.Contents("abs")%></textarea>


--> the quickest way = search
http://www.codingforums.com/showthread.php?s=&threadid=20526&highlight=textarea+value

Crash1hd
06-10-2003, 09:06 PM
Ahh that totally makes sense :)