Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I´m trying to get some data after the view rendered and think it should be in the onresultexecutionasync method
public override Task OnResultExecutionAsync(ResultExecutingContext context, ResultExecutionDelegate next)
        {
            var rtn = base.OnResultExecutionAsync(context, next);

            // Get some data here
            // Send async data to database for tracking purpose

            return rtn;
        }


I want to get the rendered HTML in order to get some values after the response is sent and store in a database.
Is there any way to do it?

Thanks?

What I have tried:

I tryed to get the result view but don´t get it. It seems tha hasn´t been rendered yet.
Posted
Comments
Laxmidhar tatwa technologies 1-Dec-19 1:48am    
your calss shoud be inhereted from viewcomponet class ,for the details follow the link https://www.codingame.com/playgrounds/4981/view-components-in-asp-net-core

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900