Spaces in UNC Paths

Discussion in 'ASP .Net Web Services' started by Luke - eat.lemons@gmail.com, Oct 17, 2006.

  1. Luke -

    Luke - Guest

    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.
    Luke - , Oct 17, 2006
    #1
    1. Advertising

  2. Luke -

    Jay Meta Guest

    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.


    <> wrote in message
    news:...
    > 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.
    Jay Meta, Oct 17, 2006
    #2
    1. Advertising

  3. Luke -

    Luke - Guest

    Luke - wrote:
    > 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.
    Luke - , Oct 17, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tor Rest

    Copy using UNC paths

    Tor Rest, Aug 11, 2003, in forum: Perl
    Replies:
    1
    Views:
    3,741
    J├╝rgen Exner
    Aug 12, 2003
  2. =?Utf-8?B?U3RldmU=?=

    Directory.Exists() with UNC Network Paths

    =?Utf-8?B?U3RldmU=?=, Feb 11, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    765
    =?Utf-8?B?U3RldmU=?=
    Feb 11, 2006
  3. news.amnet.net.au

    ftp with java using UNC paths ?

    news.amnet.net.au, Feb 16, 2004, in forum: Java
    Replies:
    0
    Views:
    817
    news.amnet.net.au
    Feb 16, 2004
  4. leo
    Replies:
    1
    Views:
    534
    R.Marquez
    Apr 8, 2004
  5. Luke -

    Spaces in UNC paths

    Luke - , Oct 17, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    1,271
    John Timney \(MVP\)
    Oct 17, 2006
Loading...

Share This Page