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. How to inherit User contol to another user control

How to inherit User contol to another user control

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

    Hi, I hv a user control. I want to use a method that is inside a BasePage which is inherited by System.Web.UI.Page. Bt I cant inherit this page into my usercontrol and use the method. So i tried to create another usercontrol put the method inside it and inherit it to the required userControl. Bt it is giving error. How i can inherit a usercontrol into another. Thank you all for your help.

    A Y 2 Replies Last reply
    0
    • S suzzain

      Hi, I hv a user control. I want to use a method that is inside a BasePage which is inherited by System.Web.UI.Page. Bt I cant inherit this page into my usercontrol and use the method. So i tried to create another usercontrol put the method inside it and inherit it to the required userControl. Bt it is giving error. How i can inherit a usercontrol into another. Thank you all for your help.

      A Offline
      A Offline
      anilpal
      wrote on last edited by
      #2

      Hi, It would be nice i f u explain certain things: 1. Whats is y r exact requirement? 2. What method u want to inherit/override and why? Which user control u r trying to create window/web and where u want to consume it?

      Regards Anil Pal

      1 Reply Last reply
      0
      • S suzzain

        Hi, I hv a user control. I want to use a method that is inside a BasePage which is inherited by System.Web.UI.Page. Bt I cant inherit this page into my usercontrol and use the method. So i tried to create another usercontrol put the method inside it and inherit it to the required userControl. Bt it is giving error. How i can inherit a usercontrol into another. Thank you all for your help.

        Y Offline
        Y Offline
        Yusuf
        wrote on last edited by
        #3

        suzzain wrote:

        I want to use a method that is inside a BasePage which is inherited by System.Web.UI.Page. Bt I cant inherit this page into my usercontrol and use the method.

        Well, what is that method? You can not access private methods

        suzzain wrote:

        How i can inherit a usercontrol into another.

        public partial class myCalendarControl : UserControl
        {
        }

        public partial class myCalendarControl2 : myCalendarControl
        {
        }

        Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

        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