info@techdevops.com | 437-991-3573 | Data Engineering Services
TechDevOps.com
Resources Tools
Experts in Microsoft SQL Server on Windows, Linux, Containers | Clusters, Always On, FCI | Migrations, Cloud, Performance



Using HTMLEncode for Blog Posts
by BF (Principal Consultant; Architecture; Engineering)
2015-06-28






MSDN:

The HTMLEncode method applies HTML encoding to a specified string. This is useful as a quick method of encoding form data and other client request data before using it in your Web application. Encoding data converts potentially unsafe characters to their HTML-encoded equivalent.


VB.NET:

Dim DescLong As String = Server.HtmlEncode(txtboxcode.Text)


ASP.NET:

<%@ Page validateRequest="false"


WebConfig:

<system.web>
<httpRuntime requestValidationMode="2.0"/>