Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Instance of page loaded?

Instance of page loaded?

Scheduled Pinned Locked Moved ASP.NET
helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    deepaks3
    wrote on last edited by
    #1

    Hi, I have a certain peice of code written in master page, and on the click of a button which is on the master page i want to execute that code on the basis of the current page loadad in the contentplaceholder. Please help me to find out a way by whihc i can determine which page is currently loaded in master-page. Thanks.

    Deepak Surana

    C 1 Reply Last reply
    0
    • D deepaks3

      Hi, I have a certain peice of code written in master page, and on the click of a button which is on the master page i want to execute that code on the basis of the current page loadad in the contentplaceholder. Please help me to find out a way by whihc i can determine which page is currently loaded in master-page. Thanks.

      Deepak Surana

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      I suspect that you can do this with reflection, or by examining the Id of the parent control. However, an easy way to build this would be to create an enum representing all the different pages, or even just those pages you especially want to recognise, and one value for all you don't. Make the page set this property in it's master page, in the init method. The property itself is a member variable of the master page.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups