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. Create ASPX pages on the fly

Create ASPX pages on the fly

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

    Hi, How can I create ASPX pages on the fly ? I know that this can be done using Reflection, but can any body point me to a good sample ? Also, what should I consider if I have to deploy these pages to some server ? What would you advice me for serializing these pages ? Flat ASPX files or assemblies (DLL) ? Hope for the best suggestions.


    "A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder


    coolestCoder

    K 1 Reply Last reply
    0
    • C coolestCoder

      Hi, How can I create ASPX pages on the fly ? I know that this can be done using Reflection, but can any body point me to a good sample ? Also, what should I consider if I have to deploy these pages to some server ? What would you advice me for serializing these pages ? Flat ASPX files or assemblies (DLL) ? Hope for the best suggestions.


      "A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder


      coolestCoder

      K Offline
      K Offline
      Ken Mazaika
      wrote on last edited by
      #2

      I actually solved this problem earlier. My solution worked because I used the same C# code file on each of the aspx pages. I'm sure it could be done otherwise, but it was easy to do that way. What I did was create a base aspx file that had all the things the aspx file would need with a specific comment where the changing data would be. I then used a streamreader and streamwriter to go through the two files. When the file got to the comment it would then use a different stream reader for that sections contents, and then continue to read the rest of the base ifle. There might be an easier solution, but this worked fine for me. -ken

      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