I have an MVC 5 project I'm working on. I am seeing some unexpected behavior when using the Html.DisplayFor method.

There is an existing page that uses Html.DisplayFor with a particular model. I need to use Html.DisplayFor on a different page, but with the same model. When I try to do this, I get unexpected behavior. It does not render the same thing even though the model is the same.

It seems safe to assume that the system is not using the same view because when I modify the view, the resulting page does not change. I've concluded that it's using the wrong view.

How do I tell what view is being used to render when I use Html.DisplayFor?

Related posts

Recent Viewed