PASSING VALUES FROM ONE VIEW TO ANOTHER VIEW.

James Smith

Total Post:48

Points:336
Posted by  James Smith
 6889  View(s)
Ratings:
Rate this:
Hi....
I want to pass values of one view to another view in mvc. For example suppose I have a view which have fields EmployeeID and EmployeeName. When I click on Submit button then those values will display on another page.
I can do it by using ViewData or ViewBag property but I would like to do it without help of these properties.

Please help me.
  1. Chris Anderson

    Post:65

    Points:455
    Re: Passing values from one view to another view.

    Hello James,

    You can use Model class properties or objects to pass data from one view to another instead of using ViewBag, ViewData and TempData properties.

    Thanks.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!