Spaces in UNC Paths

L

Luke - eat.lemons

Hi,

Could someone tell me the correct quotation to get around spaces in
paths for:

Server.MapPath("\\server\share\spaces in name.mdb")

I know its bad practice to use spaces but unfortunately i cannot help
this.

Thanks,

Luke.
 
J

Jay Meta

In C#, use

Server.MapPath(@"\server\share\spaces in name.mdb");

to indicate the string as a string literal for which escape chars are
ignored.
 
L

Luke - eat.lemons

Luke said:
Hi,

Could someone tell me the correct quotation to get around spaces in
paths for:

Server.MapPath("\\server\share\spaces in name.mdb")

I know its bad practice to use spaces but unfortunately i cannot help
this.

Thanks,

Luke.
I need to do this in ASP unfortunately that dosent work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top