Export (0) Print
Expand All

HttpEncoder.JavaScriptStringEncode Method

.NET Framework 4.6 and 4.5

Encodes a string.

Namespace:  System.Web.Util
Assembly:  System.Web (in System.Web.dll)

Protected Friend Overridable Function JavaScriptStringEncode ( _
	value As String _
) As String


Type: System.String

The string to encode.

Return Value

Type: System.String
An encoded string.

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

Supported in: 4.6, 4.5
© 2015 Microsoft