I would like to assertain the class name of an aspx page from within a user control. How can I go about doing this?
我想从用户控件中确定aspx页面的类名。我该怎么做呢?
3 个解决方案
#1
9
this.Page.GetType().AssemblyQualifiedName
#2
9
Page.GetType().BaseType.Name;
It's Give Class Name of Page.
它是给页面的类名。
Page.GetType().BaseType.FullName;
It's Give you Class Name with namespace.
它给你带有命名空间的类名。
#3
5
I can't think of a use case but try:
我想不出用例,但尝试:
string name = Page.GetType().Name;
#1
9
this.Page.GetType().AssemblyQualifiedName
#2
9
Page.GetType().BaseType.Name;
It's Give Class Name of Page.
它是给页面的类名。
Page.GetType().BaseType.FullName;
It's Give you Class Name with namespace.
它给你带有命名空间的类名。
#3
5
I can't think of a use case but try:
我想不出用例,但尝试:
string name = Page.GetType().Name;