Dynamically Generating a Form
-
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
-
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
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
orApplication
object, andRequest.Params("__EVENTTARGET")
codes. Hope this helps Nick Seng (the programmer formerly known as Notorious SMC)
God, I pity me! - Phoncible P. Bone
-
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
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 <><
-
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
Check out Forms Creator [^] available at www.snowcovered.com[^]. I think it will do what you are wanting to. Jeremy Oldham