aspx反射调用方法

string name = base.Request["action"];
                object obj2 = base.GetType().InvokeMember(name, BindingFlags.InvokeMethod, null, this, new object[0]);
                if (obj2 != null)
                {
                    s = obj2.ToString();
                }

传入方法名即可调用方法

posted @ 2019-08-10 10:20  沉迷编程的程序员  阅读(157)  评论(0编辑  收藏  举报