I have created a partial view to save email from users. The partial view is page location is under shared folder. when the partial view is rendered inside any view under views folder it works fine. That is in about page , contact page etc. But the problem occurs when I place the partial view in footer of _Layout page. The partial view is accepting the email and saving the data but when it returns it gives an error.
The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[Test.Models.FAQ]', but this dictionary requires a model item of type 'Test.Models.Subscribes'.
I tried to using Render and Partial views
@{ Html.RenderPartial("_Sub"); } and @Html.Partial("_Sub")
I also tried to add parameters but will get same error.
@{ Html.RenderPartial("_Sub",ViewData.Models.Subscribe); } and @Html.Partial("_Sub", model :Model)
This partial view not let me render other view also giving the same error. The view is performing validation and saving data to data base.
How can I resolve this error. Or is it not possible to use Partial view with models?