mercredi 27 décembre 2017

Finding asp.net webform methods through reflection

I am trying to find a method in a asp.net code behind class through reflection through the following code placed on the same page I querying.

MethodInfo MyMethod = this.GetType().GetMethod("Create", BindingFlags.Static);

But this always returns null, what is more strange is that at runtime the type of this is not MyAssembly.MyPage that type shows as ASP.MyPage_aspx. What is this type? and why am I not seeing the original code behind class type? and where do I find it?

Any idea how to solve this problem?





Aucun commentaire:

Enregistrer un commentaire