Alessia
render partial view inside bootstrap modal pop up dynamically in .net core
Once you identify whether it's the data fetching, the controller, the AJAX call, or the modal population causing the issue, you can focus your efforts on that specific area.
16 replies
render partial view inside bootstrap modal pop up dynamically in .net core
You could also replace the dynamic data fetching with static data to ensure that the modal populating mechanism works independently of the AJAX call, to further narrow down where the issue comes from
16 replies
render partial view inside bootstrap modal pop up dynamically in .net core
I would suggest you verify that the MVC/API controller method handling the AJAX call is correctly returning data, as these problems most often stem as a result of improper implementation of controller methods. Use breakpoints or logging to check if the method is executed and if it accesses the JSON file correctly, if need be. Once you have reached successful AJAX response, use JavaScript or jQuery to populate the modal elements with the received data.
16 replies
render partial view inside bootstrap modal pop up dynamically in .net core
So you have a
1. You have the modal structure set up in your Razor page.
2. You have AJAX code ready to fetch data and a controller to handle requests.
3. You're using a JSON file as your data source.
4. You're able to populate containers but facing issues with populating modals, encountering null references.
Did i get that right?
16 replies