Calling a method in parent page from user control

前端 未结 10 1172
暖寄归人
暖寄归人 2020-11-28 23:01

I\'ve a user control registered in an aspx page On click event of a button in the user control, how do i call a method which is there in the parent page\'s code

10条回答
  •  一整个雨季
    2020-11-28 23:30

    I posted something that works here: Access control > page > master nested > master

    Or if you want access to a control you can also do this:

    Update parent page Where parent has an update panel named "UpdatePanel1"

    Control

    UpdatePanel onParent1 = (UpdatePanel)Parent.FindControl("UpdatePanel1");
    onParent1.Update();
    

提交回复
热议问题