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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:44:02+00:00 2026-05-27T08:44:02+00:00

It might be a simple thing for you but I just started (1 week

  • 0

It might be a simple thing for you but I just started (1 week ago) to program with Sharp C# / Razor for my intranet web site. So I was able to learn a lot of things in the last week.

How to use CSS stylesheet
How to use C# Layout pages

So now that I can write a create web pages I’m looking for a way to organize the folders behind my website.

Fair and simple, many different department so I would like to have a the main pages on the root of my folder architecture but the pages for the departments in their own folders… So here is an example :

|- Default.cshtml

|- _siteLayout.cshmtl

|- _PageStart.cshtml

|- stylesheet.cshtml

|-------| Accounting

|-------|- acc_main.cshtml

So default.cshtml works great… cause all the files are in the root… but when I run acc_main.cshtml that is under Accounting folder… It gets the Layout properly that without any problem… Only problem… That’s the only thing it gets… No pictures shows… doesn’t get the CSS style either… so basically it gets the Layout and the acc_main.cshtml content… But no styles pictures or anything else that is in the root folder.

I hope I’m clear enough…

Sorry if it’s simple but I can’t find any information on the internet… all the Tutorials are about how to create a page with C# but

  • 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-27T08:44:02+00:00Added an answer on May 27, 2026 at 8:44 am

    One thing to note with Razor (and Mvc) is that there are two structures:

    • the physical structure in your project
    • the routing, that maps incoming requests based on url to controllers and views

    Alas, when a view references a script, image or other assets, the browser will resolve them relative to the current url.

    Example:
    The url/route /accounting/default maps to acc_main.cshtml. If acc_main.cshtml has a link like <img src="a.jpg"/> the browse will try to resolve it using /accounting/default/a.jpg.
    If you instead use <img src="/images/a.jpg"/> things will work, assuming you put images in a folder named images.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be a simple question but I'm just picking this up so please
So this might be really simple, but I haven't been able to find any
I feel like this might be really simple but I'm just not getting it
I've just started programming with Java, so might appear as silly question, but I
This might be a very simple thing. Check out the normal sql query below
This might be simple but I am new to Oracle. I am using Oracle
This might be a simple question, but i can't seem to grasp it. I
This might be a simple answer, but I am having some issues writing this
This might seem ridiculously simple, but I've been getting all kinds of error depending
Yall: I have a simple question, it might be a simple configuration issue, but

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.