As an ASP.NET developer you have undoubtedly seen controls with their runat property set to the value server. Other than being a required property, what does that property really mean?
ASP.NET is what is referred to as a server-side technology. What that means is that portions of your ASP.NET application will be ran on a web server before even reaching your users web browser.
The way the web server knows which portions of your ASPX to execute and which portions to leave as-is is determined by the runat property. Any control with runat=”server” is preprocessed by the ASP.NET runtime, and any control lacking it is left alone. Worth pointing out is that any control, even regular HTML tags can be ran at the server.
<div id="divExample" runat="server" />
With a normal div tag executed on the server, we can programmatically control that element from C# or VB.NET before its HTML is sent across the Internet. So, for example, you could make this particular div hidden by modifying its CSS styling on your Page_Load event.
divExample.Style["display"] = "none";