Okay, so ASP.net allows one to embed Images into an Assembly and access them using WebResource.axd.
I just wonder: What are the Pros/Cons of using Web Resources instead of Images in a folder on the Web Server, like how it's being traditionally done?
This article mainly mentions ease of deployment, but that doesn't seem to justify the extra amount of work.
One clear scenario is: third party controls.
I really don't want to deal with different script/image files for controls we are not developing. With embedded resources, its just the .dll file and that's it :).
The same applies if you are developing custom web controls that you will be using across different web sites.
I built custom controls that used by three different applications in same machine. When I maintain scripts for controls, I can forget deploying the new script file to every application.
In this scenario, it's good to embed resources into assembly and deploy assembly to GAC.
But the good point about external files (not embedding resources) is that, sometimes you realize a bug in script files. deploying it without resetting application is a good thing in an online application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With