protected void LinkButton1_Click(object sender, EventArgs e) { if (sender is LinkButton) { LinkButton ln = (LinkButton) sender; Control cn = Page.LoadControl("~/Admin/Module/"+ ln.Text +"/MenuAdd.ascx"); Session["Type"] = null; Session["Type"] = ln.Text; txtSelectType.Text = Session["Type"].ToString() ; PlacHolder.Controls.Add(cn); } }
Control ctrl = .....LoadControl... MethodInfo mi = ctrl.GetType().GetMethod("NameOfMethod"); object[] parameter = new object[] { par1, par2 }; mi.Invoke(ctrl, parameter);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)