Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How do you find the name of the ascx file from inside?

Reply
Thread Tools

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

 
 
ThazKool
Guest
Posts: n/a
 
      09-29-2006
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

 
Reply With Quote
 
 
 
 
Chris Fulstow
Guest
Posts: n/a
 
      09-29-2006

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()

ThazKool wrote:

> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Multiple *.ascx files with a single *.ascx.cs in VS.NET 2003 Holger (David) Wagner ASP .Net 2 07-03-2004 09:23 AM
datasource of child .ascx not visible to parent .ascx Joe ASP .Net Web Controls 1 02-16-2004 07:27 AM
can a dg be added to an ascx? ascx call a ws? Jason Shohet ASP .Net 1 11-10-2003 07:08 PM
[ASCX] Add an ascx in a webcontrol... Quentin ASP .Net 1 07-29-2003 07:37 PM



Advertisments