Print Page | Close Window

Decode URL

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=10824
Printed Date: 31 March 2026 at 5:13am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Decode URL
Posted By: neotrix
Subject: Decode URL
Date Posted: 11 June 2004 at 2:35am

Hello

I've a little problem, when i request something from the query string, (page.asp?File Name is This) the Browser changes the spaces into %20's (page.asp?File%20Name%20is%20This), since my query further reads a file of the same name, so because of the %20 ASP Returns a File Not Found Error, What to do ?



-------------
http://www.muhammadbinyusrat.com/blog/" rel="nofollow - Say to the believing men..



Replies:
Posted By: Mart
Date Posted: 11 June 2004 at 2:55am
Server.UrlDecode(Request.Querystring)


Posted By: neotrix
Date Posted: 11 June 2004 at 4:30am
this dose not work under PWS, anything else we can do ?

-------------
http://www.muhammadbinyusrat.com/blog/" rel="nofollow - Say to the believing men..


Posted By: ljamal
Date Posted: 11 June 2004 at 10:00am
Function URLDecode(strURL)
     Dim s, res, ss
     s = InStr(strURL,"%")
     Do While s>0
           ss = "&H"+Mid(strURL,s+1,2)
           res = res+Mid(strURL, 1, s-1)+Chr(0+ss)
           strURL = Mid(strURL,s+3, Len(strURL)-s-2)
           s = InStr(strURL,"%")
    Loop
    URLDecode = Replace(res&strURL, "+"," ")
End Function

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: Mart
Date Posted: 11 June 2004 at 11:12am

Originally posted by neotrix neotrix wrote:

this dose not work under PWS, anything else we can do ?

Oh, I knew it was a function in ASP.NET but wasn't sure about Classic ASP




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net