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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:38:33+00:00 2026-05-12T10:38:33+00:00

So, I thought I’d try my luck on ASP.NET. I didn’t get very far

  • 0

So, I thought I’d try my luck on ASP.NET. I didn’t get very far before I found my first problem.

I have a folder layout like so:

\
->Admin
-->Admin.Aspx

->CSS
-->Style.css

->Images
-->bg.gif

Default.aspx
Default.master

Both admin.aspx and default.aspx use the default.master page, which contains the line:

<link rel="stylesheet" type="text/css" href="CSS/Style.css" media="screen" />

This works for the default.aspx page, because the path is valid, but for the admin page it’s not.

Is there any special character, like ~ for home in Linux, to indicate the root path?
I can’t use just a slash, because the website maybe under a sub folder when hosted.

Hopefully I’ve explained myself so you can understand what I need to do 🙂

I guess it’s more an HTML issue than an ASP issue.

  • 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-12T10:38:33+00:00Added an answer on May 12, 2026 at 10:38 am

    If your <head></head> tag contains runat=”server” (which IIRC it does by default) you can simply specify it as:

    <link rel="stylesheet" type="text/css" href="~/CSS/Style.css" media="screen" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Thought I will try my luck here. Have tried virtually every solution I could
I thought I'd find more about this topic but I didn't. I have to
Thought I will point out first that I have looked around on Stackoverflow and
Thought Id ask here before jumping into a problem on the Blackberry Playbook (Adobe
Thought it was pretty straight forward. But I get a iterator not dereferencable errro
Thought I could use the BinaryWriter but haven't had any luck. Suggestions?
Thought I'd try to implement SHA1 in Haskell myself. I came up with an
I thought of an interesting problem and was wondering if anyone knows how to
Thought is was time to bring this to the Stack. We have IIS 7.5
I thought .Net code gets compiled into MSIL, so I always wondered how do

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.