Home RunTimeBinderException in asp.net using mvc5
Reply: 0

RunTimeBinderException in asp.net using mvc5

Henna
1#
Henna Published in 2017-09-14 09:53:08Z

Hey I am just badly stuck in this error from the past one week. Actually I am retrieving all the "posts" in my controller class and then in "view" class i am trying to access the attributes of the "posts" object but

I am getting this error when i run it.

"Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: ''object' does not contain a definition for 'propertyName''

Kindly help me with his.

i am doing this using viewbag. var x in viewbag.posts

when i debug i get all the fields one whole object of different posts in "a" but when i do a.anyPropertName, the compiler hits the above error.

Thanks in anticipation

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.319968 second(s) , Gzip On .

© 2016 Powered by cudou.com design MATCHINFO