Base solution for your next web application
Open Closed

set the TargetUrl of Ajaxresponse #4950


User avatar
0
jollyticket created

Is there a way to set the "targetUrl" value from an ApplicationService? I want use this property to redirect the user under a particular condition. Im'm using the asp.netcore/angular template.

thanks

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

2 Answer(s)
  • User Avatar
    0
    ivanosw1 created

    Hi, I've the same need: populate targerUrl field in a UserFriendlyException. There is a way to achieve that?

    Thank you

    Abp 9.3.0 Core + Angular

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    To do this, you can add DontWrapResult attribute to your method and wrap your result in https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Web.Common/Web/Models/AjaxResponse.cs manually.

    But, I think instead of doing that, adding a targetUrl to your response and handling it on the UI will be much easier.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)