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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. injecting controls

injecting controls

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netdatabasesysadmin
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
    sianatia
    wrote on last edited by
    #1

    hi, when using placeholder we can inject a contol to a page wich the control is instantiated.pretend that a user has built a page wich is asp.net page (with asp.net controls and maybe asp scripts)but it is not saved as asp.net page or usercontrol on the server so it is in the sql and every time the user requests his page we want to load his page and render all of the asp.net controls in the page,like what it is in the cms applications,i want to know how can i do this ?

    G I 2 Replies Last reply
    0
    • S sianatia

      hi, when using placeholder we can inject a contol to a page wich the control is instantiated.pretend that a user has built a page wich is asp.net page (with asp.net controls and maybe asp scripts)but it is not saved as asp.net page or usercontrol on the server so it is in the sql and every time the user requests his page we want to load his page and render all of the asp.net controls in the page,like what it is in the cms applications,i want to know how can i do this ?

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

      You can use the Page.ParseControl method to parse a string into a control, then add it to a placeholder.

      --- b { font-weight: normal; }

      S 1 Reply Last reply
      0
      • G Guffa

        You can use the Page.ParseControl method to parse a string into a control, then add it to a placeholder.

        --- b { font-weight: normal; }

        S Offline
        S Offline
        sianatia
        wrote on last edited by
        #3

        hi there, the point is what if i want to parse a complete asp page,is there any way to do this?

        I 1 Reply Last reply
        0
        • S sianatia

          hi there, the point is what if i want to parse a complete asp page,is there any way to do this?

          I Offline
          I Offline
          Ista
          wrote on last edited by
          #4

          why? Change your design. you might as well save it as an html page and just display it

          -------------------------------------------------------- 1 line of code equals many bugs. So don't write any!! My mad coder blog

          1 Reply Last reply
          0
          • S sianatia

            hi, when using placeholder we can inject a contol to a page wich the control is instantiated.pretend that a user has built a page wich is asp.net page (with asp.net controls and maybe asp scripts)but it is not saved as asp.net page or usercontrol on the server so it is in the sql and every time the user requests his page we want to load his page and render all of the asp.net controls in the page,like what it is in the cms applications,i want to know how can i do this ?

            I Offline
            I Offline
            Ista
            wrote on last edited by
            #5

            Actually, maybe look into web parts and build sections of the page There would be no need to chache the page into the database. If you need to then you would need to serialize all control states on the page. And really that doesn't make any sense to do it that way. Change your design to save the values you need into a serialized object or the database. That would be a much better decision. Your not thinking an object oriented way.

            -------------------------------------------------------- 1 line of code equals many bugs. So don't write any!! My mad coder blog

            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