__LINE__ and __PATH__ function.

S

Sky

In PHP there is a way of finding your current location in the file structure
with the __LINE__ and __PATH__ special commands.

Comes in handy for debugging, as well as relative pathing when making
websites.

I assume that being compiled __LINE__ makes no sense in C# asp.net, but
__PATH__ still would. Is there such a beast?

Thanks!
 
S

Sky

Ok. Sounds good. But the StackFrame class provides strings of the Functions
and Classes I am in, not the path.

I'm thinking more in line of if within an "\Controls\control.ascx" that I
can find out that I am in the Controls dir so that I can decide how many
"..\" to prepend to it to nav to where I want to go.

PS: Yes, I know about the "~" directive for the root dir -- just want to
know if there is another way.

Thanks!
 

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

Top