Use Relative Path with CopyTo command

Last post 04-01-2009, 2:47 PM by bceit. 1 replies.
Sort Posts: Previous Next
  •  04-01-2009, 2:26 PM 50645

    Use Relative Path with CopyTo command

    I am using the multiple upload code for vb.net and microsoft ajax. The uploader works as advertised but I would like to use a relative path instead of the absolute path for the item.CopyTo command.
     
    When I change the code to relative path, I get the following error:
     
    Could not find a part of the path '..\files\orders\menufeature_bnc_03.jpg'.


    I'm pretty sure this is a simple fix but I can't find it.
    Filed under: , ,
  •  04-01-2009, 2:47 PM 50651 in reply to 50645

    Re: Use Relative Path with CopyTo command

    Use Server.MapPath() to get the absolute path.
View as RSS news feed in XML