473,387 Members | 1,512 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,387 software developers and data experts.

Embedding Resources into ASP.NET 2.0 Project

Hello all,

I have a ASP.NET website written using VS 2003. I am in the process of
migrating it up to 2005.

There is one problem I just can't seem to solve.

In my original VS 2003 project I had a few icons and bitmaps included in the
project with their build action set as "Embedded Resource". Through code I
generated some bitmaps using these items for the user to see. Nothing
radical

So I create my VS 2005 project and add the Icons and Bitmaps.

There isn't anyplace I see to mark it as an embedded resource anymore!
Where is this setting hidden nowadays????

Thanks in advance,

Bob

Jun 13 '06 #1
3 1238
Sure you can set them as embedded resources! What kind of a project is it
you're creating?
Just select the file in solution explorer and you should see the Build
Action property.
Alternately for many kinds of projects you can set embedded resources from
the Resources tab of the project properties dialog.

Here's more info:
http://aspalliance.com/726
http://www.codeproject.com/aspnet/MyWebResourceProj.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Bob Trabucco" <bo**@ccc-soft.com> wrote in message
news:ed**************@TK2MSFTNGP03.phx.gbl...
Hello all,

I have a ASP.NET website written using VS 2003. I am in the process of
migrating it up to 2005.

There is one problem I just can't seem to solve.

In my original VS 2003 project I had a few icons and bitmaps included in
the project with their build action set as "Embedded Resource". Through
code I generated some bitmaps using these items for the user to see.
Nothing radical

So I create my VS 2005 project and add the Icons and Bitmaps.

There isn't anyplace I see to mark it as an embedded resource anymore!
Where is this setting hidden nowadays????

Thanks in advance,

Bob

Jun 14 '06 #2
Thanks for the relpy Steve

It's a Visual Studio 2005 project created by just selecting New and Website

When I bring up the properties page for the file all I get are 2 fields -
"file name" and "file path". No "Build Action" to be found! In fact those
are the only 2 properties I see for any file in the entire project

I saw the stuff about:

[assembly: System.Web.UI.WebResource("myImage.gif", "img/gif")]
[assembly: System.Web.UI.WebResource("myStylesheet.css", "text/css")]
[assembly: System.Web.UI.WebResource("myJavascript.js", "text/js")]

and accessing them by

Page.ClientScript.GetWebResourceUrl(...)

and such but this code is shared with a .NET Desktop app and I was hoping to
keep it all the same like it worked with Visual
Studio 2005 using the System.Reflection.Assembly.GetManifestResourceStre am()

Thanks!

Bob

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:Oa**************@TK2MSFTNGP04.phx.gbl...
Sure you can set them as embedded resources! What kind of a project is it
you're creating?
Just select the file in solution explorer and you should see the Build
Action property.
Alternately for many kinds of projects you can set embedded resources from
the Resources tab of the project properties dialog.

Here's more info:
http://aspalliance.com/726
http://www.codeproject.com/aspnet/MyWebResourceProj.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Bob Trabucco" <bo**@ccc-soft.com> wrote in message
news:ed**************@TK2MSFTNGP03.phx.gbl...
Hello all,

I have a ASP.NET website written using VS 2003. I am in the process of
migrating it up to 2005.

There is one problem I just can't seem to solve.

In my original VS 2003 project I had a few icons and bitmaps included in
the project with their build action set as "Embedded Resource". Through
code I generated some bitmaps using these items for the user to see.
Nothing radical

So I create my VS 2005 project and add the Icons and Bitmaps.

There isn't anyplace I see to mark it as an embedded resource anymore!
Where is this setting hidden nowadays????

Thanks in advance,

Bob


Jun 15 '06 #3
OOPS!

Small correction...

I was hoping to keep it all the same like it worked with Visual Studio 2003
(Not 2005) using the System.Reflection.Assembly.GetManifestResourceStre am()
"Bob Trabucco" <bo**@ccc-soft.com> wrote in message
news:OT**************@TK2MSFTNGP03.phx.gbl...
Thanks for the relpy Steve

It's a Visual Studio 2005 project created by just selecting New and
Website

When I bring up the properties page for the file all I get are 2 fields -
"file name" and "file path". No "Build Action" to be found! In fact
those are the only 2 properties I see for any file in the entire project

I saw the stuff about:

[assembly: System.Web.UI.WebResource("myImage.gif", "img/gif")]
[assembly: System.Web.UI.WebResource("myStylesheet.css", "text/css")]
[assembly: System.Web.UI.WebResource("myJavascript.js", "text/js")]

and accessing them by

Page.ClientScript.GetWebResourceUrl(...)

and such but this code is shared with a .NET Desktop app and I was hoping
to keep it all the same like it worked with Visual
Studio 2005 using the
System.Reflection.Assembly.GetManifestResourceStre am()

Thanks!

Bob

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:Oa**************@TK2MSFTNGP04.phx.gbl...
Sure you can set them as embedded resources! What kind of a project is
it you're creating?
Just select the file in solution explorer and you should see the Build
Action property.
Alternately for many kinds of projects you can set embedded resources
from the Resources tab of the project properties dialog.

Here's more info:
http://aspalliance.com/726
http://www.codeproject.com/aspnet/MyWebResourceProj.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Bob Trabucco" <bo**@ccc-soft.com> wrote in message
news:ed**************@TK2MSFTNGP03.phx.gbl...
Hello all,

I have a ASP.NET website written using VS 2003. I am in the process of
migrating it up to 2005.

There is one problem I just can't seem to solve.

In my original VS 2003 project I had a few icons and bitmaps included in
the project with their build action set as "Embedded Resource". Through
code I generated some bitmaps using these items for the user to see.
Nothing radical

So I create my VS 2005 project and add the Icons and Bitmaps.

There isn't anyplace I see to mark it as an embedded resource anymore!
Where is this setting hidden nowadays????

Thanks in advance,

Bob



Jun 15 '06 #4

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

Similar topics

2
by: Roose | last post by:
With some googling I have found these resources: http://docs.python.org/ext/win-dlls.html http://www.python.org/doc/faq/windows.html I have a large Win32/MFC/C/C++ application that has an...
0
by: Sanjay Tibrewal | last post by:
Hello, I am trying out a piece of code I downloaded from a link on msdn site. It's a server menu generating control that I tried to add to my custom control assembly. I was able to compile the...
2
by: Dennis | last post by:
I have a project, say Project A. I then start a new project, say Project B. I then add Project A to Project B. Then I add Icons to Project A and set the build property to "Embedded". I can't...
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...
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: 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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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?
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.