You must Sign In to post a response.
  • Category: ASP.Net MVC

    How do we maintain the View state in mvc

    How do we maintain the View state in mvc and how to do validation summery in mvc
  • #762571
    Hi

    You can try this code for Viewstate in MVC



    ViewData["UserName"] = VM.Newpassword;
    TempData["USerName"] = VM.Newpassword;


    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #762574
    Hi,

    We can't use ViewState in MVC, instead of that you can use ViewBag, ViewData & TempData.

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #762804
    In MVC you can use
    1. ViewData
    2. ViewBag
    3. TempData
    4. Session


Sign In to post your comments