Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > GetRows() and hyperlinks

Reply
Thread Tools

GetRows() and hyperlinks

 
 
shank
Guest
Posts: n/a
 
      03-17-2008
<%
' 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!


 
Reply With Quote
 
 
 
 
Daniel Crichton
Guest
Posts: n/a
 
      03-17-2008
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
User name and password to activate buttons and hyperlinks on website jonny ASP .Net 4 10-12-2007 04:19 PM
xml and hyperlinks within context Jimbo ASP .Net 2 11-17-2005 03:34 PM
Hyperlinks and window status Jason ASP .Net 0 02-09-2005 03:41 PM
Problem loading asp.net usercontrols dynamically with hyperlinks and images Brett ASP .Net 1 09-09-2004 04:52 AM
Hyperlinks and viewstate John ASP .Net 1 07-05-2003 11:56 PM



Advertisments