Is there any way that I can pass multiple variables to a view so I can work with the type members and methods?
I want to be more safe with my coding? ViewData
will not pass strongly typed.
ASP.net 4 MVC 3 Thanks
Is there any way that I can pass multiple variables to a view so I can work with the type members and methods?
I want to be more safe with my coding? ViewData
will not pass strongly typed.
ASP.net 4 MVC 3 Thanks
Copyright © 2021 Jogjafile Inc.
Usually the way to do this is to create a view-model that has the various values you need, i.e.
Now pass a
SomeSpecificViewModel
to the view, and tell your view to expect aSomeSpecificViewModel
. Then just access the members.