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

  • Thread starter Thread starter ThazKool
  • Start date Start date
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
 
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()
 
Back
Top