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. problem with inheriring a page

problem with inheriring a page

Scheduled Pinned Locked Moved ASP.NET
helpdesign
5 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
    sishya
    wrote on last edited by
    #1

    Hi, i have a page by name public class webform1: System.Web.UI.Page (webform) which is basically a page which dynamically generates controls .The users have to inherit the page if they want the same format of the default page (controls) so what i did in webform 2 was public class webform2 : webform1 in the webform1 i have declared the place holder pl1 where i have all the controls pushed in .On running webform2 i dont see the controls present in webform1.(webform1 is running fine with cntls being displayed) pls help me out

    M G 2 Replies Last reply
    0
    • S sishya

      Hi, i have a page by name public class webform1: System.Web.UI.Page (webform) which is basically a page which dynamically generates controls .The users have to inherit the page if they want the same format of the default page (controls) so what i did in webform 2 was public class webform2 : webform1 in the webform1 i have declared the place holder pl1 where i have all the controls pushed in .On running webform2 i dont see the controls present in webform1.(webform1 is running fine with cntls being displayed) pls help me out

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      You may consider using the MasterPage which supports visuality inheritance and it's much simpler.

      1 Reply Last reply
      0
      • S sishya

        Hi, i have a page by name public class webform1: System.Web.UI.Page (webform) which is basically a page which dynamically generates controls .The users have to inherit the page if they want the same format of the default page (controls) so what i did in webform 2 was public class webform2 : webform1 in the webform1 i have declared the place holder pl1 where i have all the controls pushed in .On running webform2 i dont see the controls present in webform1.(webform1 is running fine with cntls being displayed) pls help me out

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        You are inheriting the class, but not the contents of the .aspx file. --- b { font-weight: normal; }

        S 1 Reply Last reply
        0
        • G Guffa

          You are inheriting the class, but not the contents of the .aspx file. --- b { font-weight: normal; }

          S Offline
          S Offline
          sishya
          wrote on last edited by
          #4

          Hi, Since the placeholder is declared in the code behind then why is it not displaying. Is there a way out to inherit the controls(in .net 1.0) from one page to another so that we can use it as a master page as in .net 2.0.

          G 1 Reply Last reply
          0
          • S sishya

            Hi, Since the placeholder is declared in the code behind then why is it not displaying. Is there a way out to inherit the controls(in .net 1.0) from one page to another so that we can use it as a master page as in .net 2.0.

            G Offline
            G Offline
            Guffa
            wrote on last edited by
            #5

            What you declare in code behind is only the reference to the control, not the control itself. --- b { font-weight: normal; }

            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