Page

F.11.1- Name and Values

  by NT Community Manager.
Last Updated  by NT Community Manager.  

PublicCategorized as Appendix F.

Not tagged.
<< F.11.0- Text AreasAppendixFF.11.2- Common Errors >>

Name and Values

First, note that <TextArea>is its own tag within a form: it's not a TYPEattribute of the INPUT tag. Second, the objectiveof a text area is to allow multi-line data, such as an address or comments.Thus, we must deal with identifying where the user typed a return (enter key).

 

The confusion comes in that HTML handles this one way and theASP Request QueryString and Form collections handle it another. HTML will putcodes %0D%0A in place of each return, so that'swhat you see if you look at the entire QueryString (for example the"Entire collection as string" line of RequestSniffer). But ASP willput a space in place of the return when it parses a single field from theentire collection.

 

Therefore, your only option when trying to make sense ofdata from a text area is to parse it from the entire QueryString rather thanfrom the collection (as demonstrated in the sample below). Because thistechnique is complicated, it's easier to use separate fields whenever possiblefor the five or so data items that make up an address. However, in a field togather comments or shipping instructions you may be stuck using a TextArea, and parsing to get human-readable useabledata.

<< F.11.0- Text AreasAppendixFF.11.2- Common Errors >>

Copyright © 2003 by Wiley Publishing, Inc.

Powered by Near-TimeTerms of Services | Privacy Policy | Security Policy |