how to get a file to display from relative filespec

  • Thread starter Thread starter GS
  • Start date Start date
G

GS

I have in the project directory an html file that I want my solution to
display. what how can I specify it in a hosted web browser? How would I
specify the file spec for the html without absolute path?

In c I could use getmoduleFileName to find out the directory for the module
and from there I can use relative path. In Java, I can use some resource
function.


I tried searching the built-in help for vb.net 2005 express, but no luck,
search on the web, so far I have not found something relevant yet.


Please help

Thank you for your effort and time.
 
GS said:
I have in the project directory an html file that I want my solution to
display. what how can I specify it in a hosted web browser? How would I
specify the file spec for the html without absolute path?

In c I could use getmoduleFileName to find out the directory for the
module
and from there I can use relative path. In Java, I can use some resource
function.


I tried searching the built-in help for vb.net 2005 express, but no luck,
search on the web, so far I have not found something relevant yet.


Please help

Thank you for your effort and time.


Application.ExecutablePath will return the path your program is running
from. If its always relative to that, then you can use it to construct a
full path.
 
fantastic! Thank you very much, Robinson.

Robinson said:
Application.ExecutablePath will return the path your program is running
from. If its always relative to that, then you can use it to construct a
full path.
 
Hello gs,

..ExecutablePath returns the full path to the currently running instance.
You will probably want .StartupPath

-Boo
 
thank you, "GhostInAK". Definitely StartPath is the way to go for my
purpose - it got rid of 2 lines of codes..
 
Back
Top