How do you find the name of the ascx file from inside?

T

ThazKool

I am trying to get the name of the ascx file from inside a C# script
tag inside the ascx file. I have looked through all the properties of
the control, but I cannot find anything that gives some sort of path or
name. Can anyone help?

Thanks,
ThazKool
 
C

Chris Fulstow

Try:
this.AppRelativeVirtualPath
(Only available in .NET 2.0.)

If you want to get just the name of the control type, maybe try:
this.GetType().ToString()
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top