123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home

Source Codes

Engineering Colleges

BE Students

Training  Reports (updated)

Seminar Reports (updated

Placement Papers (updated)

Forums

   Computer Science / IT

   Electronics

   Electrical

   Mechanical

   Chemical

   Civil

   CAT / MBA

   GMAT / Foreign MBA

Latest Jobs

Engineering Jobs / Technical Jobs

Management Jobs

Sitemap

About-Us

Terms of use

Displaying  Source Code(s)  
 

 
URLDecode Function

--------------------------------------------------------------------------------

Description : The URLDecode function decodes a URL encoded string back into the original text.

<%
Private Function URLDecode(ByVal encodedstring)
Dim strIn, strOut, intPos, strLeft
Dim strRight, intLoop
strIn = encodedstring : strOut = _
"" : intPos = InStr(strIn, "+")
Do While intPos
strLeft = "" : strRight = ""
If intPos > 1 Then _
strLeft = Left(strIn, intPos - 1)
If intPos < Len(strIn) Then _
strRight = Mid(strIn, intPos + 1)
strIn = strLeft & " " & strRight
intPos = InStr(strIn, "+")
intLoop = intLoop + 1
Loop
intPos = InStr(strIn, "%")
Do While intPos
If intPos > 1 Then _
strOut = strOut & _
Left(strIn, intPos - 1)
strOut = strOut & _
Chr(CInt("&H" & _
Mid(strIn, intPos + 1, 2)))
If intPos > (Len(strIn) - 3) Then
strIn = ""
Else
strIn = Mid(strIn, intPos + 3)
End If
intPos = InStr(strIn, "%")
Loop
URLDecode = strOut & strIn
End Function
%>
 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved copyright 123ENG