Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

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

  • 20-01-2015 12:25PM
    #1
    Registered Users, Registered Users 2 Posts: 1,279 ✭✭✭


    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