AJAX: Blank Script Files
When working with custom AJAX controls and extenders, you may experience that you have blank script files pushed down to the client. This is often for one of several reasons:
- The script isn't setup as an embedded resource.
- The WebResource assembly attribute wasn't declared, and the GetScriptReferences uses Page.ClientScript.GetWebResourceUrl.
- The full resource name is incorrect, because its in the wrong folder or there is a typo in the name.
- A weird compile error happens (sometimes when shifting the file around and it may not update the DLL for some reason).
It seems that the framework doesn't error if the underlying web resource isn't found; the framework simply pushes down a blank file. This blank file really can throw someone off (it did me). But the reasoning usually isn't that difficult. Although once I had it happen, and to fix it, I excluded the file and included it again. That solved the issue, which I was thinking was due to moving the file around in the folder structure.