<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>app_code on Curtis Timson</title><link>https://hugo.curtiscode.dev/tags/app_code/</link><description>Recent content in app_code on Curtis Timson</description><generator>Hugo -- gohugo.io</generator><language>en-GB</language><lastBuildDate>Wed, 25 Mar 2015 00:00:00 +0000</lastBuildDate><atom:link href="https://hugo.curtiscode.dev/tags/app_code/index.xml" rel="self" type="application/rss+xml"/><item><title>How to store razor helpers globally</title><link>https://hugo.curtiscode.dev/post/asp-net/how-to-store-razor-helpers-globally/</link><pubDate>Wed, 25 Mar 2015 00:00:00 +0000</pubDate><guid>https://hugo.curtiscode.dev/post/asp-net/how-to-store-razor-helpers-globally/</guid><description>ASP.NET MVC Razor helpers are a great way of reducing duplicated code by containing code snippets in a View which can then be called multiple times.
&amp;lt;div&amp;gt; @DisplayGreeting(&amp;#34;Curtis&amp;#34;) &amp;lt;/div&amp;gt; @helper DisplayGreeting(string name) { &amp;lt;span&amp;gt;Hello @name&amp;lt;/span&amp;gt; } However what if you wish to call this same helper on another View?
In which case the helper can be stored in a seperate View in the &amp;ldquo;App_Code&amp;rdquo; folder.
For example create a new View in the &amp;ldquo;App_Code&amp;rdquo; folder called &amp;ldquo;MyHelpers.</description></item></channel></rss>