Documentation > CMS Template API Library > Util > UrlEncode(String)

UrlEncode

Used to encode characters that are not legal in URLs.

public System.String UrlEncode(String)


Returns

String with encoded, legal URL characters.

Parameters

NameDescriptionType
text The text. System.String

Code Example

C#

Sample:

            
            
            
            Util.UrlEncode("This is a 'string' that needs to be "url" encoded.");    
            

Connect with Crownpeak