Home Cooker Classes Others Rice CookerGX
Classes  >  encoder  >  UrlEncode(string,string)
encoder class : UrlEncode(string,string) method

Description

Encodes a URL string using a specified encoding.

Syntax

encoderInstance.UrlEncode(string anyString, string encodingName)

Arguments

ClassNameDescription
stringanyStringAn any string.
stringencodingNameA encoding name.

Return value

ClassDescription
stringA URL-encode string.

Sample code

//anyEncoder is an instance of the encoder type.

//anyString is an any string.

string encoded = anyEncoder.UrlEncode(anyString, "shift_jis");

Notes

It's a wrapper of the System.Web.HttpUtility.UrlEncode(String,Encoding).

Links for reference

Copyright © Rice All rights reserved.