Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of Model when using partial page views can sometimes cause error #12

Open
PonchoPowers opened this issue Sep 23, 2017 · 2 comments
Open

Comments

@PonchoPowers
Copy link

PonchoPowers commented Sep 23, 2017

Some views use @Html.Partial("BreadCrumbsView", Model) and because the binding is dynamic errors are produced. The use of Model is pointless and the lines where Model is passed can be written like so @Html.Partial("BreadCrumbsView").

The following is the same issue I encountered:
https://stackoverflow.com/questions/28465114/system-web-mvc-htmlhelper-has-no-applicable-method-named-partial

I will create a PR to fix this.

@fschultz
Copy link
Contributor

Thanks! Although I understand that Model could be passed implicit does any views in the demo project fail to define the model?

@PonchoPowers
Copy link
Author

Nope but if code is copied from one of the views to a custom view without a model specified it can cause issues which can be avoided by either specifying a model or removing the model from the call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants