Thoughts on building Wizard like forms using XML in ASP.NET


I am interested in creating a flexible Wizard mechanism in ASP.NET using an XML file to define what controls go on each Wizard page. The reason for using XML is that it is easier to customise the Wizard using this approach. Also all data will be persisted by writing to an XML document.



Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

It looks like you want some configurable Wizard which has controls defined in XML file.

You can use current ASP.NET Wizard or any other (jQuery) to read the XML file in code behind and populate the control accordingly (e.g. 2 text-boxes on page 1, 2 radio buttons on page 2 and so on). Sample Config XML:

<Page id="1">
<Control type="textBox" id="txtName">

And on the button click of "Next" in wizard you need to save the values of that page's control to some other xml.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SamJollyAuthor Commented:
So the Wizard control allows you to do this today? Also is possible to create some form of Workflow XML file to define which page is next dependent of what values are entered in a previous page?


You can create WizardStep dynamically. And check and set the ActiveStepIndex and other properties to behave it as you like.

I guess, these links will give you a fairly good start:
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

SamJollyAuthor Commented:
Thanks for this.... I am intrigued as to whether there is overlap between Workflow Foundation ie can you use WF to create complex workflows as opposed to the Wizard control?


I am not master as WF. But I can say WF is mostly used to control business logic at large.
In you case, you may want to develop custom control from wizard control (lengthy and time consuming process) or simply go with classes to handle wizard control.
SamJollyAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.