Export (0) Print
Expand All

ControlBuilder.AllowWhitespaceLiterals Method

Determines whether the white space literals in the control must be processed or ignored.

[Visual Basic]
Public Overridable Function AllowWhitespaceLiterals() As Boolean
[C#]
public virtual bool AllowWhitespaceLiterals();
[C++]
public: virtual bool AllowWhitespaceLiterals();
[JScript]
public function AllowWhitespaceLiterals() : Boolean;

Return Value

true if the white space literals in the control must be processed; otherwise, false.

Example

[Visual Basic] 
' Create a class that does not allow white space generated by a control
' to be created as a LiteralControl.   

Public Class NoWhiteSpaceControlBuilder
  Inherits ControlBuilder
  
  Public Overrides Function AllowWhitespaceLiterals() As Boolean
     Return False
  End Function 'AllowWhitespaceLiterals
End Class 'NoWhiteSpaceControlBuilder 

[C#] 
// Create a class that does not allow white space generated by a control
// to be created as a LiteralControl.   
public class NoWhiteSpaceControlBuilder : ControlBuilder 
{  
     public override bool AllowWhitespaceLiterals() 
     {
        return false;
     } 

}

[C++] 
// Create a class that does not allow white space generated by a control
// to be created as a LiteralControl.
public __gc class NoWhiteSpaceControlBuilder : public ControlBuilder {
public:
   bool AllowWhitespaceLiterals() {
      return false;
   }
};

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

ControlBuilder Class | ControlBuilder Members | System.Web.UI Namespace

Show:
© 2015 Microsoft