Rajan Rajan - 9 months ago 31
ASP.NET (C#) Question

Why ASP.net Ajax Control toolkit control has runat="server" tag?

When we are using ASP.net server control toolkit in ASP.NET application.

Ajax toolkit control validates at client side then why runat="server" attribute for their controls.

Answer Source

runat="server" means that your markup element will be a server-side control. This means that their ID will represent an object generated on server-side. As a result, your control will be created on server-side and, if event handlers are associated to it, then they will run. This does not mean that your control will solely run on the server, as the thing generated on server-side will be sent to the browser. This not stop them from being validated on client-side. runat is a bit misleading, its name suggests that the element will run on the server, but in fact it means it will be a server-side control, which, of course can have client-side events at the end of the day.