tags:

views:

102

answers:

1

Why I'm getting these "file not found exception" errors in the IntelliTrace? The footer.ascx control is located in the "Shared" folder.

Does this mean each of my Html.RenderPartial() will throw 6 exceptions?

alt text

A: 

These exceptions are thrown only in debug mode. In release mode, view lookups are cached. So if the view "Footer" is found at ~/Views/Shared/Footer.ascx, the runtime will remember this and not look at the other possible locations for it, so these exceptions won't be thrown.

See http://codeclimber.net.nz/archive/2009/04/22/how-to-improve-htmlhelper.renderpartial-performances-donrsquot-run-in-debug-mode.aspx for more information.

Levi