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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:47:47+00:00 2026-05-26T14:47:47+00:00

If I have a using MyProject.language; literary needs to place on every single page.

  • 0

If I have a

using MyProject.language;

literary needs to place on every single page.

My question is, is there a place that I can place the “using” just once, for every page of the project.

Thanks.

  • 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-26T14:47:48+00:00Added an answer on May 26, 2026 at 2:47 pm

    Since you mentioned page, you can configure ASP.NET to reference the namespace everywhere. This only affect the views themselves and not the code behind

    <pages>
      <namespaces>
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="Microsoft.Web.Mvc" />
        <add namespace="xVal.Html" />
        <add namespace="Telerik.Web.Mvc.UI" />
      </namespaces>
    </pages>
    

    If you use the Razor view engine of ASP.NET MVC, you can add a reference for all views like this

    <system.web.webPages.razor>
      <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <pages pageBaseType="System.Web.Mvc.WebViewPage">
        <namespaces>
          <add namespace="System.Web.Mvc" />
          <add namespace="System.Web.Mvc.Ajax" />
          <add namespace="System.Web.Mvc.Html" />
          <add namespace="System.Web.Routing" />
        </namespaces>
      </pages>
    </system.web.webPages.razor>
    

    If you are in a plain C# project or in the code behind of a page, you should know that any class that is located in a namespace will automatically reference all object in any parent namespace. Assuming a namespace Company.Software.Somethings.Data, any classes in the Data namespace will automatically reference the classes in

    • Company.Software.Somethings
    • Company.Software
    • Company
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Entity Framework in my project, and I have the problem that, once
I know that people have had some trouble with undefined CssClass values when using
I have been using git to keep two copies of my project in sync,
I have a situation in my project where I have to keep using a
I am using rowlex in my project. I have a property assigned to an
I am using MVC3 on my project. I have a view with tables and
I have deploy my project using project:deploy --go. Now i have my folders apps,
I am using CMake to build my project and I have the following line:
I have a small code base using Subsonic 2.1 in my project. I would
In my project we have multiselect option which contains more than 50000 records, using

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.