ControlBuilder.AllowWhitespaceLiterals Method

Determines whether white space literals are permitted in the content between a control's opening and closing tags. This method is called by the ASP.NET page framework.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

public:
virtual bool AllowWhitespaceLiterals ()
public boolean AllowWhitespaceLiterals ()
public function AllowWhitespaceLiterals () : boolean
Not applicable.

Return Value

Always returns true.

The AllowWhitespaceLiterals method is used to determine whether white space literals are permitted in the content between the opening and closing tags of a control. When this method returns false, the white space literals are trimmed from the content before the content is processed by the page parser. When this method returns true, the white space literals not removed.

This method is called by the ASP.NET page framework during parsing and is not intended to be called directly in you code.

Notes to Inheritors: You can override this method in your derived class to indicate whether white space literals are permitted in your custom control.

No code example is currently available or this language may not be supported.
// Create a class that does not allow white space generated by a control
// to be created as a LiteralControl.   
public class NoWhiteSpaceControlBuilder extends ControlBuilder
{
    public boolean AllowWhitespaceLiterals()
    {
        return false;
    } //AllowWhitespaceLiterals
} //NoWhiteSpaceControlBuilder

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: