Board index » Web Programming » How to embed image or javascript file into custom server control dll
|
TimGee
|
|
TimGee
|
How to embed image or javascript file into custom server control dll
Web Programming441
Good morning, does anyone know of a good tutorial, or have insight into how to embed an image or javascript file into a custom server control for asp.net? Thanks for your help!!! Big Dave *** Sent via Developersdex www.developersdex.com *** Don't just participate in USENET...get rewarded for it! - |
| Karl
Registered User |
Thu Mar 10 10:47:09 CST 2005
Re:How to embed image or javascript file into custom server control dll
In VS.Net you can mark any file to be embedded into the dll...if you click
the file, go into it's properties, you can change the Build Action to "Embedded Resource" You can then get the file via System.Reflection.Assembly.GetExecutingAssembly().GetFile("blah.js") which returns a FileStream you can then read to get the contents of... This is assuming the code is running from the current assembly, you can read another assemblies embedded resources by load that specific assembly instead of using the GetExecutingAssembly shortcut Karl -- MY ASP.Net tutorials www.openmymind.net/">www.openmymind.net/ - New and Improved (yes, the popup is annoying) www.openmymind.net/faq.aspx">www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to come!) "Big Dave" <private_pyle00nospam@yahoo.com>wrote in message QuoteGood morning, does anyone know of a good tutorial, or have insight into - |
