Groups | Blog | Home
all groups > asp.net building controls > may 2005 >

asp.net building controls : Control Deployment


kishor
5/22/2005 11:17:02 PM
Hi,
I have developed a custom control, which is in the form of a DLL. Now I have
to deploy it .. My control uses some javascripts and images and few CSS.
These are now Out of projects and included in the client project. Is there
any way to include these files in control it self. So that I can deploy only
DLL to other machine for further use.

If this is possible Please lete me know how this can be done.

Regards and TIA,
KISHOR
Brock Allen
5/23/2005 5:53:30 AM
Yep. You need to include those files are embedded resources in your assembly,
then look into the Assembly.GetManifestResourceStream to extract those embedded
resources. One last thing you'll need to do is implement and register a IHttpHandler
to serve up those resources since <img> and client side js includes will
require a seperate request to the server.

-Brock
DevelopMentor
http://staff.develop.com/ballen



[quoted text, click to view]


kishor
5/23/2005 11:37:01 PM
Hi Brock Allen,
Thanxs for your help ...looking at your anwer I can guess there are a
possibilities of including images and JS as a resource in control. how ever I
am trying to get a final solution but still I am not clear on that, could you
please send me a simple sample code or proveide me links when can i get some
material releated to this.

TIA,
KISHOR


[quoted text, click to view]
Brock Allen
5/24/2005 4:29:01 PM
I whipped one up for you:

http://staff.develop.com/ballen/samples/EmbeddedResourceSample.zip

-Brock
DevelopMentor
http://staff.develop.com/ballen



[quoted text, click to view]


AddThis Social Bookmark Button