'Confirm prompt from controller

I working with an Asp.Net Core web application, .Net 5, in a MVVM pattern.

I have a view page where a user specifies criteria to create a report and clicks Submit. The controller method then performs additional editing and finally checks to see if any records satisfy the criteria.

What I need is to be able to prompt the user if there are no records and have them confirm if a null report should be created.

I know I can't create the prompt from the controller, but I can't find a way to display a pop-up box to display the confirmation box and return the value. I've tried a number of things that I've found on the web, but none seem to work for me.

Can any provide an example?

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source