Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

ASP.Net webforms attach client side function to Master Page control from Content Page

Options
  • 20-01-2015 1:25pm
    #1
    Registered Users Posts: 1,275 ✭✭✭


    I've asked this as a question on SO but I'm not getting much of a response: http://stackoverflow.com/questions/28030667/add-client-side-handler-from-content-page-to-master-page-control

    Basically I have a master page with a drop down and two buttons in a header. Then depending on which content page I use I display different data based on the value in the dropdown.

    The users will then click one of the buttons in the header. I've implemented server side events where the master page exposes an event that is called when the dropdown changed or when the buttons are clicked.

    However I want to be able to specify client side functionality for those controls which depends upon which actual page I'm viewing, by providing something in the content page.

    Anybody any strategy for this? I mentioned one option of having a global function variable but I was thinking I could also create custom events in javascript as per this: http://css-tricks.com/custom-events-are-pretty-cool/


Advertisement