www.webdeveloper.com
Results 1 to 2 of 2

Thread: Help, want to add event code to master page that other pages will use

  1. #1
    Join Date
    Jul 2003
    Location
    UK
    Posts
    391

    Help, want to add event code to master page that other pages will use

    Hi,

    with the master page you can add code behind to it but it doesnt seem to filter down to the child pages. For example
    protected void Page_LoadComplete()
    {
    }

    with this event you seem to have to add it to every individual page you create. Is there anyway I can add some code that I only have to add once and not to every page?

    I want to perform some checks on every page load and dont want to have to add this code to every page.

    Thanks

  2. #2
    Join Date
    Oct 2009
    Posts
    658
    Create a base page class inheriting UI.Page then have the pages inherit that base class.
    Good Luck

    Santos Systems

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles