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. web forms inheritance

web forms inheritance

Scheduled Pinned Locked Moved ASP.NET
htmlasp-netoophelpquestion
2 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.
  • K Offline
    K Offline
    kakomalis
    wrote on last edited by
    #1

    Hi all, Im trying to do a web application and i have a problem with inheritance. What im trying to do is to have a base class with the top banner, navigation menu and footer in it. All my derive classes will inherit these and add their content to the body of that base class using html render or similar. I havent seen anything like that in any of the articles or forusms. Is it possible? Can i have a web form that i can treat it as a normal web for and then inherit from it? What i mean is a base web form with code behind that i can inherit. Thanks in advance, Kakomalis

    B 1 Reply Last reply
    0
    • K kakomalis

      Hi all, Im trying to do a web application and i have a problem with inheritance. What im trying to do is to have a base class with the top banner, navigation menu and footer in it. All my derive classes will inherit these and add their content to the body of that base class using html render or similar. I havent seen anything like that in any of the articles or forusms. Is it possible? Can i have a web form that i can treat it as a normal web for and then inherit from it? What i mean is a base web form with code behind that i can inherit. Thanks in advance, Kakomalis

      B Offline
      B Offline
      Brian M C
      wrote on last edited by
      #2

      You can set up a base class hierarchy for the code behinds, but not for the HTML pages. Your .aspx pages will need to be copied from a template page or use #includes (from Classic ASP) to include the common elements. Creating the inheritance hierarchy doing this sometimes creates issues for the design view in Visual Studio. The end result forces you to modify the pages in code view instead of design view. -BC

      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