Multiple choice technology web technology

What happens if an ASP.NET server control with event-handling routines is missing the runat="server" attribute from its definition?

  1. The control will operate as usual; the default is runat="server"

  2. The control will revert to being a client-side control and function as such.

  3. The control will not function; the default is runat="client".

  4. The compilation of the application will fail.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

ASP.NET server controls require the runat="server" attribute to be processed on the server. Without this attribute, the control is treated as a literal HTML element during page compilation, causing compilation to fail because server-side control properties and event handlers cannot be resolved. Option A is incorrect - there is no automatic default. Option B is wrong because the code won't compile to begin with.