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

How to embed resource in ASP.Net 2.0 web application?

Hello Developers,

It may sound like a stupid question, but how to embed a resource in ASP.Net
2.0 web application?
I mean, without using a separate library. There is no "build action"
property.

Thanks,

Tomasz J
Jun 8 '07 #1
8 2510
"Tomasz J" <oe****@nospam.nospamwrote in message
news:e3**************@TK2MSFTNGP03.phx.gbl...
It may sound like a stupid question, but how to embed a resource in
ASP.Net 2.0 web application?
Google is your friend:
http://www.google.co.uk/search?sourc...ed+resource%22
--
http://www.markrae.net

Jun 8 '07 #2
>It may sound like a stupid question, but how to embed a resource in
>ASP.Net 2.0 web application?

Google is your friend:
http://www.google.co.uk/search?sourc...ed+resource%22
By embed I mean: make a part of the executing assembly dll file.
Trust me Mark, it only appears to be an easy to answer question.
Of course, unless you know the answer, other that the above one - which I
doubt.

Tomasz J
Jun 8 '07 #3
"Tomasz J" <oe****@nospam.nospamwrote in message
news:ON**************@TK2MSFTNGP05.phx.gbl...
By embed I mean: make a part of the executing assembly dll file.
Is this not what you're looking for, then: ?
http://aspalliance.com/726
--
http://www.markrae.net

Jun 8 '07 #4
"Mark Rae" <ma**@markNOSPAMrae.netwrote in message
news:O$****************@TK2MSFTNGP04.phx.gbl...
"Tomasz J" <oe****@nospam.nospamwrote in message
news:ON**************@TK2MSFTNGP05.phx.gbl...
>By embed I mean: make a part of the executing assembly dll file.

Is this not what you're looking for, then: ?
http://aspalliance.com/726
Nope, it is not the answer. There are plenty of examples showing how to
embed resource in some control library and then use from Web Application,
but it is not the same thing.

Why do I want to embed resource in Web Application? I need it for my user
control and user controls (.ascx), as opposed to web controls, must be part
of the application. I can, of course create a separate dll for this
resource, but it is nonsense.

Tomasz J
Jun 8 '07 #5
"Tomasz J" <oe****@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Why do I want to embed resource in Web Application? I need it for my user
control and user controls (.ascx), as opposed to web controls, must be
part of the application. I can, of course create a separate dll for this
resource, but it is nonsense.
Hmm - OK...

Have you considered ILMerge instead...?
http://research.microsoft.com/~mbarnett/ILMerge.aspx
--
http://www.markrae.net

Jun 8 '07 #6

"Mark Rae" <ma**@markNOSPAMrae.netwrote in message
news:u3**************@TK2MSFTNGP06.phx.gbl...
"Tomasz J" <oe****@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>Why do I want to embed resource in Web Application? I need it for my user
control and user controls (.ascx), as opposed to web controls, must be
part of the application. I can, of course create a separate dll for this
resource, but it is nonsense.

Hmm - OK...

Have you considered ILMerge instead...?
http://research.microsoft.com/~mbarnett/ILMerge.aspx
Yes, there are also other solutions, like Apache Wicket, but I am still
hoping to find an easier way.
Another solution is to move back to "Web Project".

Tomasz J
Jun 8 '07 #7
Hi Tomasz,

For the ASP.NET 2.0 application, do you mean the default "Web Site" project
model?

For ASP.NET 2.0 web site application, it by default do not precompile and
generate dll at development time(without precompilation) comparing to the
ASP.NET 1.X/VS 2003 web project. However, for localization resource, it
provide much enhanced interfaces to manipulate them at design-time. You can
add resources (as resx files) as either "GlobalResource" or
"LocalResource", global resource can be put into the "App_GlobalResources"
folder of your ASP.NET 2.0 project while local resource can be put into a
"App_LocalResources" folder (can be created for each sub folder). The VS
2005 resource designer can let you add different kinds of resource items
into it(such as string, image ,file ,......)
#Resources and Localization in ASP.NET 2.0
http://msdn.microsoft.com/msdnmag/is...asicInstincts/

#ASP.NET Web Page Resources Overview
http://msdn2.microsoft.com/en-us/library/ms227427.aspx

Is this what you want? If you have any further questions, please feel free
to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



Jun 11 '07 #8
Hi Tomasz,

Have you any further questions on this? If there is anything else need
help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 13 '07 #9

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

Similar topics

3
by: M | last post by:
Hi Folks, Does anyone know how to embed a file into a resource in C#? You seem to be able to embed Icon, Bitmap, Cursor's & Strings. But how do you embed a file??? In VC++ version 6 you...
1
by: babylon | last post by:
if I have a Win32 DLL - X.DLL can I embed it to a .Net Application and invoke it's exported functions? normally i have to put the X.DLL in the file system and use DllImport to import/invoke the...
0
by: Andy | last post by:
Is it possible to embed an Access Database into a C# Windows Application, much like you would for a Resource File? If it is possible: Is there any advantage / disadvantage to doing this? How...
1
by: Guoqi Zheng | last post by:
I have an ASP.NET application, I need to distribute it to clients. I used some text file to stroed database scripts, .sql files. Those .sql files are very very important part of the application,...
0
by: scott.mankowitz | last post by:
Hi! Does anyone know if there is an easy way to embed fonts into a vb2005 application? Ideally, I would like to add the .ttf files as resources and just set the font using the forms designer. I...
4
by: David | last post by:
I have an application that creates a database from a text file of DDL (generated by Visio). Currently I have to deploy the text file with my application and open it using the statement: SQL =...
13
by: Lloyd Dupont | last post by:
In the good old days I believe people were using the arcane technology which came to be known as COM+ to embed other application's document in their own document. Like a Word with document a...
8
by: CodeLeon | last post by:
Hi, All. I am creating a setup program. The way it works is that the user creates their setup info, my program generates the C# code for a setup executable, embeds the xml file containing the info...
0
by: VigneshS | last post by:
Hi, I am a newbie to Globalization and Localisation Concepts. I tried almost all the methods of the Globalization concepts. But i cannot be able to embed a text file within a Resource. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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...

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.