Encode part of URL in Razor
<p>What is the proper way to encode a URL in Razor? My attempt below isn't changing the spaces into <code>%20</code>.</p>

<p><code>survey.Name</code> is the variable passed to the controller</p>

<pre><code>&lt;a href="~/Survey/Take/@Uri.EscapeDataString(survey.Name)"&gt;@survey.Name&lt;/a&gt;
</code></pre>