HttpEncoder.JavaScriptStringEncode Method (String)
.NET Framework (current version)
Encodes a string.
Assembly: System.Web (in System.Web.dll)
Protected Friend Overridable Function JavaScriptStringEncode ( value As String ) As String
Parameters
- value
-
Type:
System.String
The string to encode.
URL encoding makes sure that all browsers correctly transmit text in URL strings. Characters such as a question mark (?), ampersand (&), slash (/), and spaces might be truncated or corrupted by some browsers. Therefore, these characters must be encoded.
.NET Framework
Available since 4.5
Available since 4.5
Show: