Click here to Skip to main content
15,894,285 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

How can i loop through the properties when the Model passed to view is dynamic type in asp.net MVC?


Thanks,
Prasad
Posted

1 solution

You have to use reflection and get name and value pair for the properties.
 
Share this answer
 
Comments
Prasad Avunoori 14-Apr-15 3:11am    
Thanks, John.

This could help me. But, I need to find a way for data validation....
John C Rayan 14-Apr-15 4:06am    
Can you post some code with your model and etc.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900