473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to embed image or javascript file into custom server control dll

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 http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #1
1 5174
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
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Big Dave" <pr******************@yahoo.com> wrote in message
news:eS**************@tk2msftngp13.phx.gbl...
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 http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: coolsti | last post by:
I need some help here. I am making an application which allows a user to look at a series of picture files one at a time, and enter the outcome of various visual tests to a database. The...
6
by: Chris Fink | last post by:
Does anyone know it is possible to include a small image(.gif .jpeg) within a <SELECT><option> so that the user would see the option text as well as a little image(icon) in the option? I know this...
8
by: Lars Netzel | last post by:
Hey! I wrote a message yersterday and got some good answers and have now managed to generate a nice image. The problem is that it's all generated in an Images.Aspx file and I don't really want...
1
by: snicks | last post by:
I have a series of XLS files which I need to embed into a PowerPoint presentation on an IIS server. I’ll be using VB.NET. I’ve tried using an ASPOSE.PowerPoint control to do this and it does...
8
by: rn5a | last post by:
I have gone through a no. of posts in this NewsGroup regarding my problem but alas, couldn't come across one which would have helped me in resolving the issue. My problem is this: An ASPX Form...
4
by: bern11 | last post by:
How do you embed a custom cursor? The help says: // On the command line: // Add the following flag: // /res:CursorFileName.Cur,Namespace.CursorFileName.Cur What if you are...
1
by: johnjone | last post by:
I have a snippet header here: Content-type: multipart/form-data, boundary=AaB03x --AaB03x content-disposition: form-data; name="field1" Joe Blow --AaB03x ...
2
by: Robbe Morris - [MVP] C# | last post by:
I've never had to do this before... I have a web app that needs to look for image files outside the web site folders if it is run on localhost but look for the image files in sub folders of the...
3
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.