This problem is encountered during development.
This. GetType (). The result is ASP. ***** _ Aspx.
Then how can I get the Class Name :****. The class name obtained through string processing is not a formal method.
After querying the information, considerCodeIt is easy to understand the hidden mechanism.
HideProgramSeparate the logic from the static page layout. This technology requires the creation of an intermediate base class, which is located between the accumulated page and the class generated by the computer according to the. asp file.
Each hidden code file contains a partial classification, and ASP. net2.0 also generates a partial classification. Then, it is compiled into a class together to become the base class of the class generated by the. aspx file. In this way.
Obviously, this accesses the class generated by the. ASPX page compilation. If we rely on the class name of the hidden code file, we naturally need to access its base class.
Therefore. This. GetType (). basetype. Name is the expected result.