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 9076851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:11:58+00:00 2026-06-16T19:11:58+00:00

I have a class library that have folder Called Resources that’s our convention of

  • 0

I have a class library that have folder Called “Resources” that’s our convention of keeping the DLL that need to be referenced.

So there are some base DLL that are added in it.Lets name them as “BaseWork.dll”.

I have a web project in the same solution that have this class library. I have added the reference of Class library in the Web project. I want to access some class through this “BaseWork.dll” in the code behind of some aspx page. I am not able to access it.

There is an easiest way to do this is Add the Resource folder for our convention Sake , add the “BaseWork.dll” to it. Then add the reference in the Web-project . That would be repetition of the same things across the solution.

Is there any better way to do this?

PS: I am working in .net framework 4.0 in Visual studio 2010.

  • 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-06-16T19:11:59+00:00Added an answer on June 16, 2026 at 7:11 pm

    I want to access some class through this “BaseWork.dll” in the code behind of some aspx page

    2 things to do in your web.config:

    1. Add the assembly to the <assemblies> section:

      <compilation debug="true" targetFramework="4.0">
          <assemblies>
              <add assembly="BaseWork" />
          </assemblies>
      </compilation>
      
    2. Add the namespace containing the class you need to use to the <namespaces> section:

      <pages>
          <namespaces>
              <add namespace="BaseWork.SomeNamespace" />
          </namespaces>
      </pages>
      

    Now inside any WebForm you will be able to use classes within the namespace you declared. As an alternative to modifying the web.config you could also reference it inside a specific WebForm:

    <%@ Assembly Name="BaseWork" %>
    <%@ Import Namespace="BaseWork.SomeNamespace" %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Scenario I have a class library that is going to be called from
I have a class library project that references the version 4.1 Microsoft.Practices.Common dll. I
I have a class called LocalizedString that is defined in an external library that
I have a C#.net class library that references a folder and the files in
I have a C# class library that contains several resources files organized in folders.
I have a class library that has settings within an app.config. I know that
I have a signed class library that I want to create assemblies for via
I have a DAL class library that is included in my program as a
I have a class, which is part of a code library project that was
Hey we have a library class (lib/Mixpanel) that calls delayed job as follows: class

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.