Replaces the content of a TextBuffer object with the content of the specified file.
public boolean fromFile(str filename, [int encoding])
The name of the file to read.
The encoding option to use; optional.
true if the file operation was successful; otherwise, false.
The following are possible values for the encoding parameter that are supplied by the FileEncoding system enumeration:
If the file operation is unsuccessful, the TextBuffer object remains unchanged.
If an attacker can control input to the fromFile method, a security risk exists. Therefore, this method runs under Code Access Security. Calls to this method on the server require permission from the ExecutePermission class. Make sure that the user has development privileges by setting the security key to SysDevelopment on the control that calls this method.