Mega Code Archive

 
Categories / ASP.Net / Page
 

Page HasControls property

<%@ Page Language="vb" %> <html>    <head>       <title>HasControls method example</title>       <script runat="server">          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       </script>    </head> <body>    <asp:label id="Message" runat="server"/> </body> </html>