spaces in data causing problems

Results 1 to 3 of 3

Thread: spaces in data causing problems

  1. #1
    Wilbur Guest

    Default spaces in data causing problems

    Hello. I am using the below statments to set the variable TargetPage1 equal to a defined string("asp/gigs.asp?band_name=") and attempting to concatinate the contents of a database field(artists) to the end of that string The value that is in the database is "Johnny Lang". Notice the space in the middle of the name. The value returned to me for the variable TargetPage1 = "asp/gigs.asp?band_name=Johnny", and does not return the last name. What cand I do to fix this? Thanks<BR><BR><BR>&#060;%<BR> Dim addartis, TargetPage1<BR> addartist = FP_Field(fp_rs,"artists")<BR> TargetPage1 = "asp/gigs.asp?band_name=" + addartist <BR>%&#062;

  2. #2
    Jim Cruff Guest

    Default RE: spaces in data causing problems

    This was my response to your earlier post titled: Passing variables between ASP Pages. It will work for this problem as well. Try this:<BR><BR>Response.Write "&#060;A HREF=gigs.asp?band_name=" & Server.URLEncode("big breakfast") & "&clubpass=" & Server.URLEncode("country") & "&#062;"<BR>Response.Write"Test Link&#060;/A&#062;"<BR><BR>Always use Server.URLEncode() when passing values.

  3. #3
    Join Date
    Dec 1969

    Default RE: spaces in data causing problems

    You could also use the replace function when you request the querystring:<BR>data = REQUEST.QUEYRSTRING(REPLACE(data," ","&nbsp;"))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts