Not sure where to ask this question, but...
I'm using a TreeView component to enable browsing file folders in a
specific directory (for test purposes /Program Files/). Some users use
an ampersand ("&") in both folder and file names. This has caused me
some real grief! I'm not in a position to tell the users it's an ID 10
T error and they have to change their file and folder names.
In VS2K5, I have debugged my code and found that
sender.base.Request.QueryString =
{dir=%2fProgram+Files%2fMom+&%3b+Pop%2f}
and
sender.base.Request.RawURL="/popups/share_directory/XmlFromFileSystem.aspx?dir=/Program%20Files/Mom%20&%20Pop/"
These results reflecting a file folder /Program Files/Mom & Pop/
However, the code line:
sdir = Request.QueryString["dir"]
gives me /Program Files/Mom (space after Mom is included). In other
words, everything from the ampersand on, including the ampersand, is
truncated. The "&%3b" you see in the QueryString is my attempt to
escape the ampersand. I've also tried /& to no avail.
At this point, the boss thinks I'm a loser! Any help would be greatly
appreciated!
Asp.NET 2.0, VS 2005.
Randy