Wednesday, 31 August 2011

ClientScriptManager - Where does it insert the Javascript???

There are various options available.

You can add a script block at the top of the rendered page, using the method:

ClientScriptManager.RegisterClientScriptInclude(string key, string url)

When accessing compiled-in resources from assemblies through the WebResource.axd HTTP handler, you can wrap the contents of the resource URL with a <script> element block, using the method:

ClientScriptManager.RegisterClientScriptResource(Type type, string resourceName)

No comments:

Post a Comment