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. Inheritance and page templates 2

Inheritance and page templates 2

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

    Hi all. I am developping a website with a couple of pages and I have implemented a page template, that the other pages inherit from. However at some pages I would want to do the unorthodox thing to set values as in asp, <%=myvariable %>. I can not view this page in a browser, because of the inheritance it will not allow me to use <% %> blocks in the aspx-file. Is there a way to go around this or do I have to choose between inheritance and <% %>? Thanks /EnkelIk

    P 1 Reply Last reply
    0
    • E EnkelIk

      Hi all. I am developping a website with a couple of pages and I have implemented a page template, that the other pages inherit from. However at some pages I would want to do the unorthodox thing to set values as in asp, <%=myvariable %>. I can not view this page in a browser, because of the inheritance it will not allow me to use <% %> blocks in the aspx-file. Is there a way to go around this or do I have to choose between inheritance and <% %>? Thanks /EnkelIk

      P Offline
      P Offline
      Paul Watson
      wrote on last edited by
      #2

      What error are you getting? I have used <%=%> to get property data in my ASPX page with multiple inheritance. regards, Paul Watson Bluegrass South Africa Marc Clifton wrote: "organically fed captivity free regurgitated bee nectar" (honey) on dieting. Crikey! ain't life grand?

      E 1 Reply Last reply
      0
      • P Paul Watson

        What error are you getting? I have used <%=%> to get property data in my ASPX page with multiple inheritance. regards, Paul Watson Bluegrass South Africa Marc Clifton wrote: "organically fed captivity free regurgitated bee nectar" (honey) on dieting. Crikey! ain't life grand?

        E Offline
        E Offline
        EnkelIk
        wrote on last edited by
        #3

        Hm. Your right, <%= %> works so my description of the problem was not correct. The problem is when is try to do something like <% if(i>0) { %> <% } %> The error is "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). " I guess I will have to manage :), at least now I know <%= %> works! Thanks /EnkelIk

        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