Hi,
I've been programming for some time now and sadly I am still baffled by functions. Sometimes they do what I excpect and other times not.
I am trying to write a function that gets rid of any illegal characters from a folder that is to be created.
For some reason which I cannot fathom my line response.write(TheFolder) does not display anything. Is it something to with variables being public or private?
Thanks
Ed
I've been programming for some time now and sadly I am still baffled by functions. Sometimes they do what I excpect and other times not.
I am trying to write a function that gets rid of any illegal characters from a folder that is to be created.
Code:
<%
Function CleanFolderName(TheFolder)
TheFolder=Replace(TheFolder & "", "/", "-")
TheFolder=Replace(TheFolder & "", ":", "-")
TheFolder=Replace(TheFolder & "", "*", "-")
TheFolder=Replace(TheFolder & "", "?", "-")
TheFolder=Replace(TheFolder & "", """", "-")
TheFolder=Replace(TheFolder & "", "<", "-")
TheFolder=Replace(TheFolder & "", ">", "-")
TheFolder=Replace(TheFolder & "", "|", "-")
End Function
TheFolder="\intranets\bwbnet\docs\root\Charity Dept Admin*"
TheFolder=CleanFolderName(TheFolder)
Response.Write(TheFolder)
%>
For some reason which I cannot fathom my line response.write(TheFolder) does not display anything. Is it something to with variables being public or private?
Thanks
Ed