Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get the classname of an aspx page from inside a user control?

I would like to assertain the class name of an aspx page from within a user control. How can I go about doing this?

like image 913
Middletone Avatar asked Aug 13 '09 00:08

Middletone


People also ask

How can I see the code behind ASPX?

Right-click the . aspx page, and then click View Code. The code-behind file opens in the editor.

How do you relate an ASPX page with its code behind page?

aspx page. One major point of Code-Behind is that the code for all the Web pages is compiled into a DLL file that allows the web pages to be hosted free from any Inline Server Code. Inline Code refers to the code that is written inside an ASP.NET Web Page that has an extension of . aspx.


1 Answers

Page.GetType().BaseType.Name;

It's Give Class Name of Page.

Page.GetType().BaseType.FullName;

It's Give you Class Name with namespace.

like image 121
DJ. Avatar answered Sep 28 '22 15:09

DJ.