Call Master page method from another aspx page in web forms

Zabron Muyambo 41 Reputation points
2021-11-24T12:53:34.787+00:00

Hi guys

I have an asp.net web-forms application with a Master page. I am loading a separate (not content) page using Ajax popup extender, when a button is clicked (from master page). When the popup closes, I want to call a method in the calling (popping) master page so that it refreshes some controls.

Am using C#, asp.net 4.5

Please assist.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,272 questions
{count} votes

Accepted answer
  1. Yijing Sun-MSFT 7,066 Reputation points
    2021-11-25T04:17:33.05+00:00

    Hi @Zabron Muyambo ,
    As far as I think,there is impossible to call the method which in the masterpage from the other page. My idea is like this: your PopupPage is inside the modalpopup and then when you close the modalpopup,it trigger the event to change the image using javascript.
    My demo is like this:
    152417-capture11.png
    Best regards,
    Yijing Sun


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful