0

You use a runat="server" attribute everytime you want to access a html control (div,span,H1) from the server, you then also have to set it everytime you use an asp.net web control (<asp:Button/>).

My question is, for the asp.net web controls (all those beginning with <asp:) why haven't the asp.net team just removed it and set the property up in the background?

It makes no sense to have to set it every time, as there is no other option than server.

Is there is a point behind all of this, or an exception to the rule am I not aware of?

KidCode
  • 3,990
  • 3
  • 20
  • 37

0 Answers0