Name
HasControls
Synopsis
Boolean = Page.HasControls( )
Returns a Boolean value that indicates whether the page contains child controls.
Parameters
-
Boolean
A Boolean value that indicates whether the page contains child controls.
Example
The code example displays a message indicating whether the page has controls in its Controls collection, based on the value returned by HasControls:
Sub Page_Load( ) If Page.HasControls = True Then Message.Text = "The page contains controls." Else Message.Text = "The page does not contain controls." End If End Sub
Get ASP.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.