Add image to resource file

S

shapper

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
 
L

Laurent Bugnion

Hi,
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
 
A

apathetic

shapper said:
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
 
L

Laurent Bugnion

Hi,
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top