--- title: "[How Do I:] Add JavaScript Event Handlers to ASP.NET Server Controls | Microsoft Docs" author: rick-anderson description: "In this video Chris Pels will show how to interface JavaScript methods with ASP.NET server controls to provide client side functionality for the server contr..." ms.author: aspnetcontent manager: wpickett ms.date: 03/20/2008 ms.topic: article ms.assetid: 4e8d3220-3299-41ad-897b-bbf62e2e667f ms.technology: dotnet-webforms ms.prod: .net-framework msc.legacyurl: /web-forms/videos/how-do-i/how-do-i-add-javascript-event-handlers-to-aspnet-server-controls msc.type: video --- [How Do I:] Add JavaScript Event Handlers to ASP.NET Server Controls ==================== by [Chris Pels](https://twitter.com/chrispels) In this video Chris Pels will show how to interface JavaScript methods with ASP.NET server controls to provide client side functionality for the server controls. First, see how to add client event handlers declaratively by extending ASP.NET server controls with custom attributes. Next, see how to add attributes for mapping client methods to ASP.NET server controls programmatically which offers the advantage of being done at runtime. Finally, learn how to reference the ID of a server control, which is rendered dynamically by ASP.NET, in JavaScript code. [▶ Watch video (18 minutes)](https://channel9.msdn.com/Blogs/ASP-NET-Site-Videos/how-do-i-add-javascript-event-handlers-to-aspnet-server-controls)