I have 2 components A and B. When I start the application, a div slides on the page and component A is loaded via a partial view on the div. When i click on the button in template of component A, another div slides out. I want to display the component B on this div. How do i achieve this? I cannot use routing as routing would mean I have to place both of these components under a parent component. I want these both components to be independent of each other but still exist on the same page in different divs.
Basically I have an MVC Structure starting at the Index page. Index page has a div which contains partial view Home.cshtml Home.cshtml->
<app1>
Loading
</app1>
Also Index page has another div which contains partial view Contacts.cshtml. Contacts.cshtml->
<app2>
Loading..
</app2>
Both the divs are next to each other. How can I load both the components at the same time on different divs in the same page. Both templates just displays some text.