正文使用C#反射实现用户控件调用父页面方法IP云V管理员/2022-09-25/2 阅读 09/25提示:扫一扫查出行【扫一扫了解最新限行尾号】复制提示using System.Reflection;MethodInfo mi = this.Page.GetType().GetMethod("GetUserName"); //该处的GetUserName是父页面里的方法名称 int userId=; return mi.Invoke(p, new object[] {userId}).ToString(); //userId指的指的是GetUserName所要传递的参数。