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. Dynamically Generating a Form

Dynamically Generating a Form

Scheduled Pinned Locked Moved ASP.NET
databasesysadminbeta-testingcode-review
4 Posts 4 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.
  • T Offline
    T Offline
    twoods 0
    wrote on last edited by
    #1

    I'm trying to build a wizard to dynamically change the content of an aspx page. Has anyone done something like this. Let me explain briefly what I'm looking for. I will set up a blank .aspx page. I will have another aspx page that will act as my wizard page. On this wizard page, I will allow the user to add server controls such as a textbox to the page. Ideally, the user will choose an option to select a textbox and submit. After submitting, my blank aspx page have a textbox in it. If you have done something similar, please provide feedback. I'm not sure what's all that's needed to do this. Also, this will take effect on the database side as well Thanks

    N R J 3 Replies Last reply
    0
    • T twoods 0

      I'm trying to build a wizard to dynamically change the content of an aspx page. Has anyone done something like this. Let me explain briefly what I'm looking for. I will set up a blank .aspx page. I will have another aspx page that will act as my wizard page. On this wizard page, I will allow the user to add server controls such as a textbox to the page. Ideally, the user will choose an option to select a textbox and submit. After submitting, my blank aspx page have a textbox in it. If you have done something similar, please provide feedback. I'm not sure what's all that's needed to do this. Also, this will take effect on the database side as well Thanks

      N Offline
      N Offline
      Nick Seng
      wrote on last edited by
      #2

      I don't know why you would want to do something like that. Speaking as someone with experience in this subject matter, it is a PITA to add and maintain dynamic controls in ASP.NET. But if you're still dead set for it, I would advice you to add a table control in your blank page first, as it would make adding your controls later easier. The hardest part is to keep track of which control is supposed to be there and which is not when you postback. It's then when you have to play with IsPostBack, ViewState or Application object, and Request.Params("__EVENTTARGET") codes. Hope this helps Nick Seng (the programmer formerly known as Notorious SMC)


      God, I pity me! - Phoncible P. Bone

      1 Reply Last reply
      0
      • T twoods 0

        I'm trying to build a wizard to dynamically change the content of an aspx page. Has anyone done something like this. Let me explain briefly what I'm looking for. I will set up a blank .aspx page. I will have another aspx page that will act as my wizard page. On this wizard page, I will allow the user to add server controls such as a textbox to the page. Ideally, the user will choose an option to select a textbox and submit. After submitting, my blank aspx page have a textbox in it. If you have done something similar, please provide feedback. I'm not sure what's all that's needed to do this. Also, this will take effect on the database side as well Thanks

        R Offline
        R Offline
        Rocky Moore
        wrote on last edited by
        #3

        If you have not already, you might look into the IBuySpy, Rainbow and DotNetNuke portals. They do all this already and more. At least it might give you ideas about generating content. Recently I spend a little time trying to build a simple web control that acted as a content panel and would allow me to specify the user control I wanted to fill that area with and it would dynamically create the user control acting as a content panel. Was a pain to start with but turned on pretty easy. Dynamically creating controls and adding them does not appear to be a big problem, but the portals (above) already do that and more and are free. Also, for dynamic generation of controls you might look up articles here on CP by Mark Clifton. He has an article where he generates a web page and a WinForm window from the same XML configuration file. Rocky Moore <><

        1 Reply Last reply
        0
        • T twoods 0

          I'm trying to build a wizard to dynamically change the content of an aspx page. Has anyone done something like this. Let me explain briefly what I'm looking for. I will set up a blank .aspx page. I will have another aspx page that will act as my wizard page. On this wizard page, I will allow the user to add server controls such as a textbox to the page. Ideally, the user will choose an option to select a textbox and submit. After submitting, my blank aspx page have a textbox in it. If you have done something similar, please provide feedback. I'm not sure what's all that's needed to do this. Also, this will take effect on the database side as well Thanks

          J Offline
          J Offline
          Jeremy Oldham
          wrote on last edited by
          #4

          Check out Forms Creator [^] available at www.snowcovered.com[^]. I think it will do what you are wanting to. Jeremy Oldham

          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