Click here to Skip to main content
15,900,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have an application which contains bootstrap tab like structure for a product. One tab shows product information other shows gallery and variants and the last tab is a form.

I am able to create a structure for first tab using MVC but when I started working on second tab, I got stuck. I had a view and model for first tab and in second tab I rendered another view attached with another model. Both models are from different folder structure.

I am getting error that
The model item passed into the dictionary is of type 'one', but this dictionary requires a model item of type 'two'.]

I think I haven't created model and view structure correctly.

What I have tried:

What I am trying is to make tabs link to controller which will render the view and further but in bootstrap tab structure all three tab content belong to same HTML DOM. So, I am having difficulty in putting controller link to tabs.
Posted
Updated 7-Feb-17 21:35pm
Comments
dirtyshooter 7-Feb-17 7:53am    
I think you are not able to reference the model correctly. Doesnt matter on folder structure. Give proper reference to both the models and try using partial view in case you are not using.

1 solution

I have included
C#
@Html.RenderAction
into tabs. this will send request to controller action to render a partial view.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900