London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
If you want to replace the tokens when the content is requested (not just saved for the first time) you could create an http handler.
https://docs.microsoft.com/en-us/dotnet/api/system.web.ihttphandler.processrequest?view=netframework-4.8
You can create custom MVC ActionFilter and override OnResultExecuting to achieve this.
https://arranmaclean.wordpress.com/2010/08/10/minify-html-with-net-mvc-actionfilter/
Hi,
I am wanting to introduce a few tokens to my blocks, such as #name#. At runtime, I'd like the ASP.NET MVC system to find all tokens within the markup being output and replace them with dynamic values from an internal API.
Is there a good spot to intercept the rendering of all blocks in a bulk way so that I don't have to code this logic all over the place?