From: shank on
<%
' Loop through the array holding the result set and display the data
For iCounter= varC1Begin to varC1End
Response.Write("<a href=prices.asp?manuf=" & arrResultSet(0,iCounter) & ">"
& arrResultSet(0,iCounter) & "</a><br>")
Next
%>

In the above Response.Write statement arrResultSet(0,iCounter) displays the
manufacturer just like it should.

However, within the hyperlink, if a manufacturer has 2,3, or more words, it
will only show the first word. Anything after the first space is ignored.
Why?

thanks!


From: Daniel Crichton on
shank wrote on Mon, 17 Mar 2008 12:36:57 -0400:

> <%
> ' Loop through the array holding the result set and display the data
> For iCounter= varC1Begin to varC1End
> Response.Write("<a href=prices.asp?manuf=" & arrResultSet(0,iCounter) &
> ">" & arrResultSet(0,iCounter) & "</a><br>")
> Next %>

> In the above Response.Write statement arrResultSet(0,iCounter) displays
> the manufacturer just like it should.

> However, within the hyperlink, if a manufacturer has 2,3, or more
> words, it will only show the first word. Anything after the first
> space is ignored. Why?

> thanks!

Because spaces aren't allowed in URLs. There is a simple fix using
Server.URLEncode

Response.Write("<a href=prices.asp?manuf=" &
Server.URLEncode(arrResultSet(0,iCounter)) & ">"

--
Dan