dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Relative path

  1. #1
    Join Date
    May 2004
    Posts
    8

    Question Relative path

    Hello

    I have created a windows application in which I want to place images.

    The code is as follows

    Bitmap left = (Bitmap)Image.FromFile(@"E:\Workspace\02-Jun-2004\WindowsApplication1\Images\new.jpg");
    this.pbx3.Image=left;

    Now I make this application as Smart Client and try to access from another machine. At this point it doesn't find the image directory in E drive and gives error.

    How can I give the relative path?

    Thanks
    Kantesh Vernekar

  2. #2
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    server.mappath will allow you to specify the path from the directory you are currently in.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles