3
Answers

How To Make View Take More Parameter in Asp.net Mvc

Amr Elshaer

Amr Elshaer

4y
490
1
If you Want To make your view Take more argument you can use Tuple instead of making an object
 Let`s say I have a view that takes IEnumerable of Student If I want to pass something with it to view I make an object 
that contain IEnumerable of student and string Message or using ViewBag or ViewData  so you can use Tuple
in view (IEnumerable<Student> students, string message) so it makes view code and view dependency.
Answers (3)