dimanche 23 août 2020

Controller Method no showing the web form in ASP.NET MVC

I have the following action in my controller:

 public RedirectResult OnlineInvoice(string PickupNo)
    {
       
        return Redirect("/ReportsWebForms/frmReportOnlineInvoice.aspx?PickupNo=" + 102);
    }

I tried to call it using:

 $.get("@Url.Action("OnlineInvoice","Report")", { PickupNo : '@ViewBag.PickupNo'});

and

 $.post("@Url.Action("OnlineInvoice","Report")", { PickupNo : '@ViewBag.PickupNo'});

I put a break point on the action and I can see that is called, however the webform is never showing,the website still showing the current view. but If I called it via a link as in :

<a href="/Report/OnlineInvoice">Report</a>

The web form is loaded normally !

Any idea?




Aucun commentaire:

Enregistrer un commentaire