473,396 Members | 2,082 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,396 software developers and data experts.

Add image to resource file

Hello,

I created an Asp.Net 2.0 web site in Visual Studio and I want to add an
image to the resource file.
I read that I should set my image's Build Action to EmbeddedResource.
However, when I right click on my image I can't see that option.

What should I do?

Thanks,
Miguel

Oct 17 '06 #1
3 2717
Hi,

shapper wrote:
Hello,

I created an Asp.Net 2.0 web site in Visual Studio and I want to add an
image to the resource file.
I read that I should set my image's Build Action to EmbeddedResource.
However, when I right click on my image I can't see that option.

What should I do?

Thanks,
Miguel
To set a file to embedded resource, you must select the file, press F4
to show the properties, and then set the "Build Action" to "Embedded
Resource".

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Oct 17 '06 #2
shapper wrote:
I created an Asp.Net 2.0 web site in Visual Studio and I want to add an
image to the resource file.
I read that I should set my image's Build Action to EmbeddedResource.
However, when I right click on my image I can't see that option.
You can't embed a resource into an ASP.NET 2.0 site (why would you want
to when the file is already sat on a web server?) You would need to
embed the resource into a different assembly and load it from there.

apathetic

Oct 17 '06 #3
Hi,

apathetic wrote:
shapper wrote:
>I created an Asp.Net 2.0 web site in Visual Studio and I want to add an
image to the resource file.
I read that I should set my image's Build Action to EmbeddedResource.
However, when I right click on my image I can't see that option.

You can't embed a resource into an ASP.NET 2.0 site (why would you want
to when the file is already sat on a web server?) You would need to
embed the resource into a different assembly and load it from there.

apathetic
That's correct, and to be precise, I was talking about the Web
Application Project, not the "New Website" model. Sorry about the confusion.

Greetings,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Oct 17 '06 #4

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

Similar topics

1
by: peter | last post by:
Hi, I have 2 questions: 1) I have read the articles on how to embedd and image in a resource file. I have also read the articles on how to open it from the resource file and put it in a...
4
by: Matthew Wieder | last post by:
I have a form which contains a picturebox control which displays a gif image. By default, the image that was selected when I designed the dialog gets stored in the resx file and gets compiled and...
1
by: D. Yates | last post by:
Hi, I am looking for an example of how to extract bitmap images from an embedded resource file (a file with *.res extension, which can be viewed inside of the ide and can hold bitmaps, icons,...
6
by: Saya | last post by:
Hello, This is a repost 'cause I haven't solve the problem: I can't use the System.Drawing class 'Image.FromStream' in the CompactFramework environment. What I've done with respect to Brendan's...
5
by: aiki727 via DotNetMonster.com | last post by:
Hello everyone, Where do I store a bitmap or jpeg that I am using for a forms background image when I deploy the application? Or do I link these files to the app during the deployment? Thanks...
3
by: UJ | last post by:
I've got an image I want to embed in a dll to use on a screen later. I've got it in a resource file, got it to compile in to the dll. The problem is getting it back out. It seems like my problem is...
5
by: Mark Denardo | last post by:
I have a DLL that I created that contains a reference to an image file on my hard drive and when I go to use that DLL in another program it complains that it can't find it. (I'm using a relative...
62
by: ivan.leben | last post by:
How can I really delete a preloaded image from memory/disk cache? Let's say I preload an image by creating an Image object and setting its src attribute to desired URL: var img = new Image();...
0
by: jcvoon | last post by:
Hi: I'm using VS2005, I add my image into project resource file, and my picture box and button control reference the image from the project resource file, what is the default transparent color...
3
by: bbrewder | last post by:
I am interested in hearing how other people have handled sharing resources in multiple projects (for example, a save icon). We have a product that has many forms within many projects. Many of...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.