Search code examples
c#asp.netconfigurablescreens

ASP.net configurable wizard pages


I am looking for possible approaches to the following task.

Currently have a number of ASP.net pages which are essentially copies of one another but some contain textboxes,dropdownlists which others do not. this is because initially a number of pages were developed for a particular product and then another product came on board which had to do the same thing as the other pages i.e. get user to imput data and then save it. However now we are left with a large number of pages which essentially do the same thing and are difficult to maintain.

So what i am hoping to do is scrap the code as it is and replace with a configurable wizard. the requirement being that all the controls on the pages should be configurable as to whether they appear on the page and whether they are required fields.

Any ideas,examples,thoughts appreciated

thanks N

cheers niall


Solution

  • So I am not a big fan of the Wizard control. I would think that the best option would be to create a class that represents all of the configuration options possible and then to dynamically render the ASPX page at runtime based on the configuration options provided by the user. By Dynamically I mean adding the server controls to the page in the Init event as opposed to just hard coding them onto the page.