J
Joel Leong
How can I use Reflection to get full namespace of my web page?
I got a page under this namespace
namespace CompanyABC.Admin
{
public class FruitList: System.Web.UI.Page
{
}
}
Q1: When i try to use this.GetType().ToString, it returns
ASP.FruitList_aspx. but I want to get CompanyABC.Admin.FruitList.(When i
watch the object Page in the watch window, I can see
CompanyABC.Admin.FruitList under the [ASP.FruitList_aspx] tree node.) How
can I do that?
Q2: How to truncate CompanyABC so that I can get Admin.FruitList only?
I got a page under this namespace
namespace CompanyABC.Admin
{
public class FruitList: System.Web.UI.Page
{
}
}
Q1: When i try to use this.GetType().ToString, it returns
ASP.FruitList_aspx. but I want to get CompanyABC.Admin.FruitList.(When i
watch the object Page in the watch window, I can see
CompanyABC.Admin.FruitList under the [ASP.FruitList_aspx] tree node.) How
can I do that?
Q2: How to truncate CompanyABC so that I can get Admin.FruitList only?