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

  • SEARCH
  • Home
  • 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: What kind of resources are needed to learn how to create one's own
Question in title pretty much sums it up. I have some resource object defined
Question: I need to read a CSV file. I use the FileHelpers library to
Question is self explanatory, again I need an alternativs in cocos2d android to use
Question I'm creating a service for my app, but there's probably pritty simple thing
Question is quite simple. Let's say I have an URL config with line: url(r'^models/(?P<model_group_id>[0-9]+)/(?P<page>\d+)/$',
Question: What is the correct syntax to use when selecting a column value into
Question : Is there a simple way to print out an array in Ruby
This could be a duplicate question, but I have no idea what search terms
Question is pretty self explanitory. I want to do a simple find and replace,

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.