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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Usually the way to do this is to create a view-model that has the various values you need, i.e.
Now pass a
SomeSpecificViewModelto the view, and tell your view to expect aSomeSpecificViewModel. Then just access the members.