close
using System.Reflection;
Control myView= LoadControl("~/my_Control//myUserControl.ascx");
//設定屬性值
myView.GetType().GetProperty("這邊填寫在myUserControl.ascx裡面的屬性").SetValue(myView,"要設定的值", null);
//取得屬性值
myView.GetType().GetProperty("這邊填寫在myUserControl.ascx裡 面的屬性").GetValue(myView, null)
全站熱搜