Assembly: System.Web (in system.web.dll)
/** @property */ public Encoding get_FileEncoding () /** @property */ public void set_FileEncoding (Encoding value)
public function get FileEncoding () : Encoding public function set FileEncoding (value : Encoding)
Property ValueThe default encoding value.
The FileEncoding property specifies the default encoding that is used to interpret the data that is included in the .aspx, .asmx, and .asax file types. If the file encoding is specified in the Web.config file, the actual file must be saved in the same encoding. Unicode files and UTF-8 files that are saved with the byte order mark prefix IsByteOrdered property are automatically recognized regardless of the value of the FileEncoding.
If the FileEncoding property setting for the server or application is configured to use UTF-16, and if UTF-16 is not the encoding that is used for an .aspx page in the scope of the configuration file, the output that is sent to the client browser is corrupted. For this reason, ensure that the configured FileEncoding value matches the encoding that is used in the .aspx page.