"
 
 
 
ASP.NET (snapshot 2017) Microsoft documentation and samples

[How Do I:] Add JavaScript to An ASP.NET Page

by Chris Pels

In this video Chris Pels will show how to include JavaScript to an ASP.NET page for use on the client page to provide a richer and more robust user experience. First, see how to include JavaScript directly within an ASP.NET page and reference the script from within HTML page elements. Next, see how to abstract the JavaScript to an external JavaScript file which offers the advantage of being cached by the browser and can be used by multiple pages. Lastly, learn how to add JavaScript to a page dynamically at runtime which has the advantage of including script for a specific situation or where information such as a control ID is not known until runtime. As part of the dynamic script sample see how to add JavaScript that can be automatically executed when the page loads as well as the click event for button controls (Button, LinkButton, and ImageButton).

▶ Watch video (24 minutes)





Comments ( )
<00>  <01>  <02>  <03>  <04>  <05>  <06>  <07>  <08>  <09>  <10>  <11>  <12>  <13>  <14>  <15>  <16>  <17>  <18>  <19>  <20>  <21>  <22>  <23
Link to this page: //www.vb-net.com/AspNet-DocAndSamples-2017/aspnet/web-forms/videos/how-do-i/how-do-i-add-javascript-to-an-aspnet-page.htm
<SITEMAP>  <MVC>  <ASP>  <NET>  <DATA>  <KIOSK>  <FLEX>  <SQL>  <NOTES>  <LINUX>  <MONO>  <FREEWARE>  <DOCS>  <ENG>  <CHAT ME>  <ABOUT ME>  < THANKS ME>