Web User Control Physical Path

J

John Smith

Is there a way to programmatically retrieve the current executing ASCX file
(similar to Request.PhysicalPath())?

Scenario:
- User goes to http://.../default.aspx
- Within the default page I have a web user control page executing. If I
put the Request.PhysicalPath within the CodeBehind for the ASCX file, then I
get "c:\...\default.aspx". But what I really want is
"c:\...\MyUserControl.ascx".

Any ideas how to do this?
 
J

John Smith

Thanx for the response. That is a step in the right direction but I need
the full file path including filename. Any ideas?
 

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