Programming Languages
AJAX
Subjective
Apr 03, 2013
Whats the difference between RegisterClientScriptBlock, RegisterClientScriptInclude and RegisterClientScriptResource?
Detailed Explanation
For all three, a script element is rendered after the opening form tag. Following are the differences:
1 - RegisterClientScriptBlock - The script is specified as a string parameter.
2 - RegisterClientScriptInclude - The script content is specified by setting the src attribute to a URL that points to a script file.
3 - RegisterClientScriptResource - The script content is specified with a resource name in an assembly. The src attribute is automatically populated with a URL by a call to an HTTP handler that retrieves the named script from the assembly.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts