Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

path

Server.MapPath(“.”), Server.MapPath(“~”), Server.MapPath(@””), Server.MapPath(“/”). What is the difference?

September 3, 2022 by Magenaut

Can anyone explain the difference between Server.MapPath("."), Server.MapPath("~"), Server.MapPath(@"") and Server.MapPath("/")?

Categories ASP.NET, Q&A Tags asp.net, directory, filesystems, mapping, path Leave a comment

Slash (/) vs tilde slash (~/) in style sheet path

September 3, 2022 by Magenaut

ASP.NET offers two ways to specify paths for style sheets:

Categories ASP.NET, Q&A Tags absolute-path, asp.net, path, relative-path, stylesheet Leave a comment

Absolute path back to web-relative path

September 2, 2022 by Magenaut

If I have managed to locate and verify the existence of a file using Server.MapPath and I now want to send the user directly to that file, what is the fastest way to convert that absolute path back into a relative web path?

Categories ASP.NET, Q&A Tags .net, asp.net, c#, mappath, path Leave a comment

@(at) sign in file path/string

September 2, 2022 by Magenaut

Possible Duplicate:
What’s the @ in front of a string for .NET?

Categories ASP.NET, Q&A Tags asp.net, c#, escaping, path, string Leave a comment

Getting relative virtual path from physical path

September 2, 2022 by Magenaut

How can I get the relative virtual path from the physical path in asp.net?
The reverse method is like below:

Categories ASP.NET, Q&A Tags asp.net, c#, path Leave a comment

Specify more than one directory in Web.Config’s Location Path element

September 1, 2022 by Magenaut

In my ASP.NET’s Web Config file I have the following location elements defined:

Categories ASP.NET, Q&A Tags asp.net, location, path, web-config Leave a comment

Different between ./ , ../ , ../../ , ~/ on file path(URL) in asp.net

August 30, 2022 by Magenaut

I have a script file .

Categories ASP.NET, Q&A Tags asp.net, browser, c#, path, url Leave a comment

Getting Project Root Path In Controller ASP.NET MVC?

August 30, 2022 by Magenaut

I am using dotlesscss for my css and I remember how to use that but what I am forgetting is how to get the root project path so that I can generate the full file path to my .less file to get for the less engine to parse. How do I get the project root path so that I can generate the path for my less files?

Categories ASP.NET, Q&A Tags asp.net, asp.net-mvc, c#, path Leave a comment

Using Server.MapPath in external C# Classes in ASP.NET

August 27, 2022 by Magenaut

I’m trying to get the absolute path of certain files in a C# class. Server.MapPath works great of course for ASPX and their code-behind pages, but that doesn’t exist in another class file. I tried HostingEnvironment.MapPath(), but that complains that the relative virtual path isn’t allowed. Any thoughts?

Categories ASP.NET, Q&A Tags asp.net, c#, file, path, relative-path Leave a comment

How do I get the complete virtual path of an ASP.NET application

August 27, 2022 by Magenaut

How do I know the the complete virtual path that my application is currently hosted? For example:

Categories ASP.NET, Q&A Tags asp.net, path, virtual Leave a comment
Older posts
Page1 Page2 … Page7 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress