What happen when we add runat=“server”

We all know that there are 2 types of controls that are available while developing web applications. They are HTML Controls as well as Server Controls. The main difference between these two controls is just the runat attribute. For any normal HTML Control like input, it becomes server control when you add the runat=“server” attribute.

By adding this attribute, we can work with the control at code behind directly with out having any difficulties. But did you ever thought what happens when you add this attribute?

The secret is that, the visual studio IDE creates a .designer.cs file as a code base for our .aspx page. This code base file is automatically generated, and we have nothing to do there. The purpose of this code base is to construct the controls that have the runat attribute.

What do you say?

Comments

Popular posts from this blog

Network Intrusion Detection using Supervised ML technique

Common mistakes by Interviewer

Keep the system active, to avoid the auto lock