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. please ans me

please ans me

Scheduled Pinned Locked Moved ASP.NET
4 Posts 3 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.
  • A Offline
    A Offline
    amarnath n n
    wrote on last edited by
    #1

    can i access master page variables from appcode files if yes please give me a suggestion

    A 1 Reply Last reply
    0
    • A amarnath n n

      can i access master page variables from appcode files if yes please give me a suggestion

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      amarnath n.n wrote:

      Subject: please ans me

      This should not be the subject. You have to ask the qestion in proper way.

      amarnath n.n wrote:

      can i access master page variables from appcode files if yes please give me a suggestion

      In App_Code, you should have classes. So make the Public Property Over There, Create object App_Code Class and Asign the Value from Master page. Then you will get variable value on you App_Code.

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

      A 1 Reply Last reply
      0
      • A Abhijit Jana

        amarnath n.n wrote:

        Subject: please ans me

        This should not be the subject. You have to ask the qestion in proper way.

        amarnath n.n wrote:

        can i access master page variables from appcode files if yes please give me a suggestion

        In App_Code, you should have classes. So make the Public Property Over There, Create object App_Code Class and Asign the Value from Master page. Then you will get variable value on you App_Code.

        Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

        A Offline
        A Offline
        amarnath n n
        wrote on last edited by
        #3

        sorry,excuseme!!! my actual question is how to access controls in master page from appcode class

        C 1 Reply Last reply
        0
        • A amarnath n n

          sorry,excuseme!!! my actual question is how to access controls in master page from appcode class

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

          The non nasty way to do this, is to have a class derived from Page, which returns a strongly typed version of your master page derived class, instead of just the base master. Then you can access the proprties of the master page neatly in any page derived from your new base class. A new base class lets you define all sorts of things and make them visible to all pages, as well as putting any code to check if a user is logged in, in one place.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          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