I use a function for that. There might a slicker way to do it, but this is what I came up with. You can replace each puncuation mark with just an empty string "" instead of the encoding.
Function EncPunc(checkPunc)
strTmp = checkPunc
strTmp = Replace(strTmp,"'","%39")
strTmp = Replace(strTmp,"%","%25")
strTmp = Replace(strTmp,"&","%26")
strTmp = Replace(strTmp,"#","%23")
strTmp = Replace(strTmp,";","%3B")
strTmp = Replace(strTmp,"/","%2F")
strTmp = Replace(strTmp,"?","%3F")
strTmp = Replace(strTmp,":","%3A")
strTmp = Replace(strTmp,"@","%40")
strTmp = Replace(strTmp,"=","%3D")
strTmp = Replace(strTmp,"<","%3C")
strTmp = Replace(strTmp,">","%3E")
strTmp = Replace(strTmp,"""","%22")
strTmp = Replace(strTmp,"{","%7B")
strTmp = Replace(strTmp,"}","%7D")
strTmp = Replace(strTmp,"|","%7C")
strTmp = Replace(strTmp,"\\","%5C")
strTmp = Replace(strTmp,"^","%5E")
strTmp = Replace(strTmp,"~","%7E")
strTmp = Replace(strTmp,"[","%5B")
strTmp = Replace(strTmp,"]","%5D")
strTmp = Replace(strTmp,"`","%60")
EncPunc = strTmp
End Function
**********************************************************************
Sent via Fuzzy Software @
http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...