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. All Controls in my user control are null...

All Controls in my user control are null...

Scheduled Pinned Locked Moved ASP.NET
csharpvisual-studiocollaborationquestion
3 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.
  • R Offline
    R Offline
    RoyRose78
    wrote on last edited by
    #1

    Hey all, I have a simple user control with panel on it. when I create this user control (manualy and not dragging it from solution explorer) somehow all controls inside this user control are null... In the user control I try to use the panel object in some method I've created but the panel object is null, so it throws an exception. I'm sure I've done something wrong but, Do I need to create the inner controls of the user control also?? p.s - I'm using Visual Studio 2005 Team Edition. Thanks, Roy.

    T 1 Reply Last reply
    0
    • R RoyRose78

      Hey all, I have a simple user control with panel on it. when I create this user control (manualy and not dragging it from solution explorer) somehow all controls inside this user control are null... In the user control I try to use the panel object in some method I've created but the panel object is null, so it throws an exception. I'm sure I've done something wrong but, Do I need to create the inner controls of the user control also?? p.s - I'm using Visual Studio 2005 Team Edition. Thanks, Roy.

      T Offline
      T Offline
      ToddHileHoffer
      wrote on last edited by
      #2

      You can download my project from the article I wrote. It will show you how to use user controls if you don't want to add them in the designer. http://www.codeproject.com/useritems/User\_Controls\_Made\_Easy.asp

      I didn't get any requirements for the signature

      R 1 Reply Last reply
      0
      • T ToddHileHoffer

        You can download my project from the article I wrote. It will show you how to use user controls if you don't want to add them in the designer. http://www.codeproject.com/useritems/User\_Controls\_Made\_Easy.asp

        I didn't get any requirements for the signature

        R Offline
        R Offline
        RoyRose78
        wrote on last edited by
        #3

        OK, go it! I use the user control's ctor but it's not the way to load it manually.. That's the way: Control _control = LoadControl("ActivitiesControl.ascx"); Roy.

        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