ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 28th, 2000, 11:21 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
How to handle Spaces in Variable for creating href..

<i><b>Originally posted by : Sanjay Goel (sgoel@indcon.com)</b></i><br />Hi<br /><br />I am creating href in one coloum (output of searches) which is in tabular form..<br /><br />eg. <a href="<%=Variable%>">Where Actual value for this variable is "Sliver Stream"</a><br /><br />You know, spaces should be converted to %...<br /><br />Can anyone tell me how to convert the variable in proper format for href...<br /><br />Thanks in Advance..<br /><br />Sanjay<br />sgoel@indcon.com<br />

Reply With Quote
  #2  
Old March 30th, 2000, 02:30 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Chris Snider (csnider@worldnet.att.net)</b></i><br />Sanjay,<br />In your output statement use Server.URLEncode(stuff).<br />Your output would be <a href="<%= Server.URLEncode(Variable)%>"><%= Variable%></a><br />This will use the value of the variable as the href anchor point as well as display the contents in "straight" form.<br /><br />If you need further explanation or comments, please email me.<br /><br />Chris Snider<br /><br /><br />------------<br />Sanjay Goel at 3/28/2000 9:21:33 PM<br /><br />Hi<br /><br />I am creating href in one coloum (output of searches) which is in tabular form..<br /><br />eg. <a href="<%=Variable%>">Where Actual value for this variable is "Sliver Stream"</a><br /><br />You know, spaces should be converted to %...<br /><br />Can anyone tell me how to convert the variable in proper format for href...<br /><br />Thanks in Advance..<br /><br />Sanjay<br />sgoel@indcon.com<br />

Reply With Quote
  #3  
Old March 30th, 2000, 09:48 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : </b></i><br />Thanks Chris..<br /><br />It worked..<br /><br />There is also another way of doing it..<br /><a href="<%= Server.Replace(Variable)," ","%20"%>"><%= Variable%></a><br /><br />It will replaces all spaces with the appropriate characters, which will work with IE and Netscape...<br /><br />Regards, Sanjay<br /><br /><br />------------<br />Chris Snider at 3/30/2000 12:30:33 AM<br /><br />Sanjay,<br />In your output statement use Server.URLEncode(stuff).<br />Your output would be <a href="<%= Server.URLEncode(Variable)%>"><%= Variable%></a><br />This will use the value of the variable as the href anchor point as well as display the contents in "straight" form.<br /><br />If you need further explanation or comments, please email me.<br /><br />Chris Snider<br /><br /><br />------------<br />Sanjay Goel at 3/28/2000 9:21:33 PM<br /><br />Hi<br /><br />I am creating href in one coloum (output of searches) which is in tabular form..<br /><br />eg. <a href="<%=Variable%>">Where Actual value for this variable is "Sliver Stream"</a><br /><br />You know, spaces should be converted to %...<br /><br />Can anyone tell me how to convert the variable in proper format for href...<br /><br />Thanks in Advance..<br /><br />Sanjay<br />sgoel@indcon.com<br />

Reply With Quote
  #4  
Old March 30th, 2000, 03:20 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Chris Snider (csnider@worldnet.att.net)</b></i><br />Sanjay,<br /><br />Yes the Replace function will work, but you have to use it for all "illegal" characters. The Server.URLEncode function prepares the entire response to work in a URL and you don't have to remember or code for all the possibilities.<br /><br />Regards<br /><br />Chris Snider<br />------------<br /> at 3/30/2000 7:48:55 AM<br /><br />Thanks Chris..<br /><br />It worked..<br /><br />There is also another way of doing it..<br /><a href="<%= Server.Replace(Variable)," ","%20"%>"><%= Variable%></a><br /><br />It will replaces all spaces with the appropriate characters, which will work with IE and Netscape...<br /><br />Regards, Sanjay<br /><br /><br />------------<br />Chris Snider at 3/30/2000 12:30:33 AM<br /><br />Sanjay,<br />In your output statement use Server.URLEncode(stuff).<br />Your output would be <a href="<%= Server.URLEncode(Variable)%>"><%= Variable%></a><br />This will use the value of the variable as the href anchor point as well as display the contents in "straight" form.<br /><br />If you need further explanation or comments, please email me.<br /><br />Chris Snider<br /><br /><br />------------<br />Sanjay Goel at 3/28/2000 9:21:33 PM<br /><br />Hi<br /><br />I am creating href in one coloum (output of searches) which is in tabular form..<br /><br />eg. <a href="<%=Variable%>">Where Actual value for this variable is "Sliver Stream"</a><br /><br />You know, spaces should be converted to %...<br /><br />Can anyone tell me how to convert the variable in proper format for href...<br /><br />Thanks in Advance..<br /><br />Sanjay<br />sgoel@indcon.com<br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > How to handle Spaces in Variable for creating href..


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway