Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4536728
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:34:31+00:00 2026-05-21T14:34:31+00:00

The question’s simple: how could one use embedded resources in asp.net applications? What are

  • 0

The question’s simple: how could one use embedded resources in asp.net applications? What are the steps to include a resource in the assembly, and how to reference it? What are the gotchas that could be encountered?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T14:34:32+00:00Added an answer on May 21, 2026 at 2:34 pm

    Edit: For a version without referencing Page and ClientScript, see What is the right way to handle Embedded Resources on a Razor View?

    After spending a half of a day I’ve learned these:

    1. to embed a resource one needs to set it’s Build Action to Embedded Resource (in VS Solution Explorer rightclick the file -> Properties)

    2. next AsssemblyInfo.vb must be modified to make this resources available for WebResource queries. Add [Assembly: System.Web.UI.WebResource("MyWebResourceProj.Test.css", "text/css")] to AssemblyInfo.vb located in MyProject folder of the project.

      • The name consists of root namespace/assembly name +’.’+filename. To be 100% sure of the name, use the following code snippet to look it up:
        Dim resNames = Assembly.LoadFile("YourDll.dll").GetManifestResourceNames()
      • Note that the assembly’s Root Namespace must be the same as the Assembly Name (this took me about 4 hours to realize. At least with .Net v4 that is the case)
      • If there are references inside the css ( <%=WebResource(“NS.image.jpg”)%> ) than pass PerformSubstitution:=true for that css’s WebResource attribute.
    3. Referencing the resource can be done with Page.ClientScript.GetWebResourceUrl(GetType(MyWebResourceProj.ConssumingPage), "MyWebResourceProj.Test.css")

      • Note that instead of GetType(Typename) one could use Me.GetType(), but again, that won’t work if the class is inherited, so beware!

    Resources:

    • Debugging ASP.NET 2.0 Web Resources: Decrypting the URL and Getting the Resource Name
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Question title is basically the entire question. In ASP.NET you can set the Culture/UICulture
Question is pretty self explanitory. I want to do a simple find and replace,
Question: Can anyone please provide a full code example that shows how one does
Question from the one interview. Please explain what does this C++ code mean: void
Question is as simple as the title: How to measure GPS signal strength?
My question is about memory use and objects in actionscript 2. If I have
Question: I get an exception serializing this class to a nHibernate xml file ({Could
Question: I use the bidirectional dicionary class I found here: Bidirectional 1 to 1
Question What's the full code to enable jQuery on a page and then use
Question: Can I use the multiprocessing module together with gevent on Windows in an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.