0

I want to create multi stage registration form where i would be having next and previous button like when moving from 1st step to 2nd step in registration form and then coming back to again 1st step with previous button then 1st form should retain all its values.

I am using this code from Darin Dimitrov answer:multi-step registration process issues in asp.net mvc (splitted viewmodels, single model)

But in Darin Dimitrov answer problem is dat with this line:

@Html.EditorFor(x => currentStep, null, "")

I would be having different different fields with slight modification of design too on every new registration form and i would be having progress bar too on which i will update progress bar status.

So in Darin Dimitrov answer i would like to use different different View.Is that possible with Darin Dimitrov answer to use different views?

Or if anybody having another solution then please do post your solution.

Community
  • 1
  • 1
I Love Stackoverflow
  • 6,738
  • 20
  • 97
  • 216
  • Is there a particular reason for not doing this on one page (use the next/back buttons to show and hide sections)? –  Oct 06 '15 at 07:03
  • I am having lots of fields to be included in registration process.so cant keep this on one page – I Love Stackoverflow Oct 06 '15 at 07:04
  • 1
    How many is lots? Even Darin would agree that his answer is very anti-MVC (trying to mimic WebForms ViewState) –  Oct 06 '15 at 07:06
  • Consider this example:http://www.spanedea.com/launch/register.In this Registratration process try to sign up as tutor.I am creating the same – I Love Stackoverflow Oct 06 '15 at 07:14
  • 1
    That is hardly lots of controls and its only 2 pages anyway so a bit unclear what your asking. There is no need for a wizard. You can just save the details in the POST method (to `Session` or a temporary repository) and then redirect to the new page –  Oct 06 '15 at 07:20
  • 1
    In any case the site you linked to permanently saves the data once you complete the first page. If you post and then start over again and try to fill in the same details it will give you an error noting that you have already been registered. –  Oct 06 '15 at 07:31
  • @StephenMuecke:So at each stage of registration process it is permanently storing the data? – I Love Stackoverflow Oct 06 '15 at 08:26
  • 1
    Certainly the first part appears to be. And that's a good way to do it IMO. You can always have a flag in the database table and set it when all the other data has been saved to indicate the registration process is complete. And it has the advantage that the user can start it, then come back at a later time to finish it. –  Oct 06 '15 at 08:35
  • So at each stage of registration process i save the data in my tables right and not to persist at each stage of this registration process.right?? – I Love Stackoverflow Oct 06 '15 at 08:39
  • That would be my recommendation. –  Oct 06 '15 at 08:41
  • Well thank you so much for your recommendation.Wanted that only.1 last thing to ask you.I am thinking to take 1 field in database say for eg:ProfileCompletePercentage.Now when user will fill its Personal details i will update this field with some value say 30%.Like wise for acedemicdetails 30% etc..So when 100 is done its means user has successfully completed this registration process.Is this ok?? – I Love Stackoverflow Oct 06 '15 at 08:43
  • 1
    Sound fine (although could also be BIT fields for (say) `Step1Complete`, `Step2Complete` etc or an INT for (say) `CompletedSteps`). It would make it easier if the user completed say step 3 of 5 and then had to abandon it and come back later to complete the rest - it means you would know exactly which page to display to them. –  Oct 06 '15 at 08:50
  • @StephenMuecke:Yeah you are absolutely right.Havent consider that.Thank you sou much.Needed this suggestion.Thank you once again.your every comment is really worth so +1 – I Love Stackoverflow Oct 06 '15 at 08:53

0 Answers0