--- uid: mvc/videos/mvc-2/how-do-i/mvc2-html-encoding title: "MVC2 - Html Encoding | Microsoft Docs" author: microsoft description: "In this video you will learn how to use the new HTML Encoding shortcut syntax in ASP.NET to guard against script injection, and to use the MvcHtmlString when..." ms.author: aspnetcontent manager: wpickett ms.date: 03/23/2010 ms.topic: article ms.assetid: d8d2d4fc-780a-48bb-82f1-4125cce03b2a ms.technology: dotnet-mvc ms.prod: .net-framework msc.legacyurl: /mvc/videos/mvc-2/how-do-i/mvc2-html-encoding msc.type: video --- MVC2 - Html Encoding ==================== by [Microsoft](https://github.com/microsoft) In this video you will learn how to use the new HTML Encoding shortcut syntax in ASP.NET to guard against script injection, and to use the MvcHtmlString when you want to include HTML in your strings. [▶ Watch video (2 minutes)](https://channel9.msdn.com/Blogs/ASP-NET-Site-Videos/mvc2-html-encoding) > [!div class="step-by-step"] > [Previous](how-do-i-use-httpverbs-attributes-in-an-mvc-application.md) > [Next](mvc2-stronglytyped-helpers.md)