How to Inject a JavaScript method from CodeBehind Class in ASP.Net?

0
Posted

How to Inject a JavaScript method from CodeBehind Class in ASP.Net?

0

.Net 2.0 introduced a new class called ClientScriptManager to do this task easily. ClientScript property of the Page object will give us an instance of ClientScriptManager object. This class uniquely identifies scripts by a key String and a Type. Scripts with the same key and type are considered duplicates and hence similar scripts are avoided. The below code will explain us 2 of the useful methods of ClientScriptManager object that helps in injecting JavaScript methods.

Related Questions