PageParser.EnableLongStringsAsResources 属性

定义

获取或设置一个值,该值指示 ASP.NET 是否应优化其内部对 ASP.NET 分析页或控件时遇到的长字符串的处理。Gets or sets a value that indicates whether ASP.NET should optimize its internal handling of long strings that are encountered when ASP.NET parses a page or control.

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 static property bool EnableLongStringsAsResources { bool get(); void set(bool value); };
public static bool EnableLongStringsAsResources { get; set; }
member this.EnableLongStringsAsResources : bool with get, set
Public Shared Property EnableLongStringsAsResources As Boolean

属性值

Boolean

如果 ASP.NET 应优化其内部对长字符串的处理,则为 true;否则为 falsetrue if ASP.NET should optimize its internal handling of long strings; otherwise false.

注解

默认情况下,ASP.NET 页分析器将包含256个或更多字符的字符串转换为临时资源字符串。By default, the ASP.NET page parser converts literal strings that contain 256 or more characters into a temporary resource string. 此属性可设置为以 false 禁用此行为,而是改为直接将文本字符串写入响应流。This property can be set to false in order to disable this behavior and instead to write the literal string directly to the response stream. 此属性只能在事件发生之前在 global.asax 文件中设置 PreApplicationStartThis property can only be set in the Global.asax file before the PreApplicationStart event occurs. 可随时读取此属性。This property can be read at any time.

适用于