0

I know it's a opinion based question but some help would be nice before jumping onto it.

I'm developing a wizard control form in .Net Core where I've to play with multiple data's back and forth i.e. Next and Previous button. There are few choices I've got,

  1. ViewBag
  2. ViewData
  3. TempData

Types of data: String, Integer, Arraylist/List

Selected data could be massive up to 300 fields with validation where I'll check required data which can't be null or empty.

Once I fill-up the data I'll press Next so the data should be forwarded onto next view and if I press Back I want to recover previously selected data(can change and press Next again) and at last I'll save all the data's into database.

I've seen demos and tutorial videos for Asp.Net and C#, but I need to find best way for .NET Core MVC framework

crazyCoder
  • 75
  • 1
  • 13
  • Could you please share with us which tutorial and example you been watched and where the confusion has raised? So that it would be easier to assist you further. – Md Farid Uddin Kiron May 24 '22 at 06:10
  • @MdFaridUddinKiron, this is for the wizard sample https://www.c-sharpcorner.com/UploadFile/skumaar_mca/wizard-control-in-Asp-Net/ . For viewbag https://www.aspsnippets.com/Articles/ASPNet-Core-Pass-Send-TextBox-values-from-View-to-Controller.aspx . I hope this helps – crazyCoder Jun 01 '22 at 03:45
  • Well I have checked your given link, could you please share your current code snippet and the expectations so that it will be easier to assist you further. – Md Farid Uddin Kiron Jun 03 '22 at 01:21
  • @MdFaridUddinKiron, I haven't started coding as I'm waiting for an opinion on which should I choose out of those 3 options. – crazyCoder Jul 08 '22 at 03:29
  • Based on your description and scenario you could use either [`ViewBag and ViewData`](https://learn.microsoft.com/en-us/aspnet/core/mvc/views/overview?view=aspnetcore-6.0#using-viewdata-and-viewbag-simultaneously) both will work as expected. If you need to handle dynamic data then `Viewbag` is ideal for that. – Md Farid Uddin Kiron Jul 08 '22 at 05:01

0 Answers0