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. Accesing class from user control

Accesing class from user control

Scheduled Pinned Locked Moved ASP.NET
tutorial
2 Posts 1 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.
  • E Offline
    E Offline
    econner
    wrote on last edited by
    #1

    I have create a class called settings to store site settings that are needed in various usercontrols. In my page_load of my web page (webform1.aspx), I am setting the properties for this class. I have also created a few webusercontrols that are being added to the webform1.aspx page. However, I am not sure how to access the settings class with the set values from within the webusercontrol. The webpage and usercontrols do not share a common base class.

    E 1 Reply Last reply
    0
    • E econner

      I have create a class called settings to store site settings that are needed in various usercontrols. In my page_load of my web page (webform1.aspx), I am setting the properties for this class. I have also created a few webusercontrols that are being added to the webform1.aspx page. However, I am not sure how to access the settings class with the set values from within the webusercontrol. The webpage and usercontrols do not share a common base class.

      E Offline
      E Offline
      econner
      wrote on last edited by
      #2

      To clarify... I want to create a class that will hold setting values and I want this to be accessible/common with the webform and the usercontrol. The values would be set in the webform, and when the usercontrol is added to the webform, it will retrieve the values needed from the common settings class.

      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