Functionally, they're the same, assuming you actually have something like:
@{ Html.RenderPartial("~/Areas/Search/Views/Shared/_CoverageSearch.cshtml"); }
Instead of just:
Html.RenderPartial("~/Areas/Search/Views/Shared/_CoverageSearch.cshtml");
The latter is not valid Razor syntax, so the view wouldn't render properly.
Otherwise, the only difference is that RenderPartial
writes directly to the response, whereas Partial
returns a string. But, neither method would cause the error you indicate.
I think most likely, you have debugged while having this view as your active tab. Visual Studio will sometimes get confused and make the actual view file your start URL, which is inaccessible via a browser. Just change the URL in the browser to the actual route that ends up loading that view.