[thelist] ASP checking if there's a space

Anthony Baratta Anthony at Baratta.com
Thu Feb 14 14:48:01 CST 2002


At 11:10 AM 2/14/2002, Christine Breen wrote:

>If the data (for example 'useful links') in the database contains spaces,
>how can ASP check for spaces in the data (useful links) and replace the
>spaces with a % (useful%links)?  The information is being stored in the
>variable and used for an URL.  Using MS Access right now.

Wouldn't you want to URL Encode the data, if you are going to push it back
to the browser as a link/URL??

e.g.

         varURLString = URLData(varDBString)

''''''''''''''''''''''''''''''''''''''''''''''''''
'' URLData Function
'' Required Info Passed to Function:
''      varDataLine
''''''''''''''''''''''''''''''''''''''''''''''''''
Function URLData(varDataLine)
     if not(varDataLine = "") then
                 varDataLine = Server.URLEncode(varDataLine)
     end if
     URLData = varDataLine
End Function

----
Anthony Baratta
President
Keyboard Jockeys

"Conformity is the refuge of the unimaginative."




More information about the thelist mailing list