Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Decode URL
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Decode URL

 Post Reply Post Reply
Author
neotrix View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 09 November 2003
Location: Pakistan
Status: Offline
Points: 433
Post Options Post Options   Thanks (0) Thanks(0)   Quote neotrix Quote  Post ReplyReply Direct Link To This Post Topic: Decode URL
    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 ?

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2004 at 2:55am
Server.UrlDecode(Request.Querystring)
Back to Top
neotrix View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 09 November 2003
Location: Pakistan
Status: Offline
Points: 433
Post Options Post Options   Thanks (0) Thanks(0)   Quote neotrix Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2004 at 4:30am
this dose not work under PWS, anything else we can do ?
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.