The HTMLEncode method of the Server class returns a string that represents the HTML equivalent of the string that is passed in.
public String HTMLEncode(String str);