If you have js code in _Calendar,the page which refernces _Calendar will not load the js code.And you need to put the js code of _Calendar into the page which refernces _Calendar.
Here is a demo worked.
Main.cshtml(reference a partial view):
ViewData["Title"] = "Main";
<div style="height:400px;width:400px;border:1px solid red;">
<partial name="_partial1" />
_partial1.cshtml(in Shared folder):
I need to create a partial view for a calendar and it’s not showing up I don’t know why. I try to display the partial view with:
I don’t know what the problem is…If I made a button in my navigation bar with:
<a class="nav-link text-dark" asp-area="" asp-controller="Booking" asp-action="Calendar">Calendar</a>
and then in the BookingController simply do this:
public class BookingController : Controller
public IActionResult Index()
public ActionResult Calendar()
There it shows up..but not in the Booking Index like it should. Here are some images:
The red rectangle is where I want the _Calendar to be. This Image if what shows if I go to _Calendar using the nav bar:
The _Calendar partial view is in my shared folder. Let me know if you need any more information.
So I added a
inside the _Calendar and that shows up but the calender does not:
Where in the BookingController ? how ? I only use the return View(“_Calendar”); for the navigation bar button and there it works. But I want the _Calendar to show up in the Booking Index that is why it should just show up when i do IActionResult Index return View(). It works with smaller and simpler partial views like