Difference of ViewBag and ViewState in Mvc C #
2 answers
ViewState is an old classic concept ASP.NET WebForms
where controls and ASPX maintain their state between HTTP requests using a hidden field.
ViewBag is a completely different concept in applications ASP.NET MVC
. It's just a simple container that you can use to pass some data from controller to view. This state does not support HTTP requests.
+2
source to share
Getting started with your question
In MVC, we don't have a Viewstate. To maintain the values, link below to the link
Keeping browsing in Asp.net mvc?
ASP.NET MVC not working with ViewState and Postback?
we use ViewBag, ViewData, TempData to stream values ββfrom controller to view or controller to controller.
+3
source to share