html encode

javascript of escape can encode to html form

e.g. change " " to %20

MSDN can decode javascript of escape

use this function:

HttpUtility.UrlDecode

javascript:

encodeURIComponent