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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:47:59+00:00 2026-06-12T05:47:59+00:00

I am learning ASP.NET MVC with Razor. I noticed that sometimes some cshtml files

  • 0

I am learning ASP.NET MVC with Razor.
I noticed that sometimes some cshtml files already have some namespaces imported (example for NopCommerce, which I am using to learn)

@model ProductListModel
@using Telerik.Web.Mvc.UI

Or

@{
    Layout = "~/Views/Shared/_ColumnsOne.cshtml";

    Html.AppendScriptParts(@Url.Content("~/Scripts/jquery.fileupload.js"));
    Html.AppendScriptParts(@Url.Content("~/Scripts/jquery.lightbox-0.5.min.js"));
    Html.AppendCssFileParts(@Url.Content("~/Content/Style/jquery.fileupload-ui.css"));
    Html.AppendCssFileParts(@Url.Content("~/Content/Style/jquery.lightbox-0.5.css"));
}

(Html.AppendScriptsParts is declared in the nop.Web.Framework.UI)
If I make my own cshtml file, I need to add the “using” line or reference with the like this:

@using System.Linq;
@using Nop.Web.Framework.UI

@model Nop.Admin.Models.Proposal.ProposalListModel

Is there any trick I am missing to reference these items? Why are the first 2 examples simpler and do not need the explicit reference?

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-06-12T05:48:00+00:00Added an answer on June 12, 2026 at 5:48 am

    Add your namespace here ...\Views\Web.config:

      <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" />
            <add namespace="Your.Namespace" />  
          </namespaces>
        </pages>
      </system.web.webPages.razor>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am learning ASP.NET MVC now a days and I have found that most
I'm learning ASP.NET MVC Framework, From some articles like this , it seems that
I'm learning asp.net mvc and found something interesting: It seems that I can't explicitly
I really like the MVC way and have actually enjoyed learning ASP.NET MVC (I
I have just started learning asp.net mvc and one reason of the primary reasons
I have been learning ASP.NET MVC in the last few months and I think
I have been learning ASP.NET MVC for a few months. I have learned about
I've only recently started learning ASP.NET MVC 3 and already faced with such problem.
I'm learning MVC and ASP.NET. I have a table in which the last column
Problem No 1: I have started learning ASP.NET MVC. I have made a simple

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.