Skip to content

Magenaut

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

directory

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

If a folder does not exist, create it

September 3, 2022 by Magenaut

I use a FileUploader control in my application. I want to save a file to a specified folder. If this folder does not exist, I want to first create it, and then save my file to this folder. If the folder already exists, then just save the file in it.

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

Getting current directory in .NET web application

September 2, 2022 by Magenaut

So I have a web project, and I’m trying to get the root directory of the website using the c# method Directory.GetCurrentDirectory(). I don’t want to be using a static path as the file locations will be changing in the future. This method is running in my imageProcess.aspx.cs file, but where I thought it would return:

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

Directory.Exists not working for a network path

August 31, 2022 by Magenaut

I have a line of code checking if a directory exists and then getting the list of files in it.

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

Deleting a directory results in application restart

August 31, 2022 by Magenaut

I have an application with 2 directories (books and export).
If we create a book or a page of a book in the application a directory is added with the id of the page (this is for uploading resources).
If we delete a page, the page (and it’s directory) is removed from the database and the filesystem.

Categories ASP.NET, Q&A Tags asp.net, delete-directory, directory, session Leave a comment

Listing Folders in a Directory using asp.net and C#

August 30, 2022 by Magenaut

.aspx file:

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

Upload a folder in ASP.NET of Flash or Silverlight

August 28, 2022 by Magenaut

Is there any way to upload entire folder (a folder) in asp.net?

Categories ASP.NET, Q&A Tags asp.net, directory, flash, silverlight, upload Leave a comment

What is the aspnet_client folder in my ASP.NET website?

August 27, 2022 by Magenaut

I inherited a website and see that folder in the web root. I’m trying to clean out the old crap, and wondering if I can delete it.

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

Directory vs DirectoryInfo

August 27, 2022 by Magenaut

Are they equivalent or alternatives to each other? Is any of them deprecated and if so, which one? Which one is recommended for use in an ASP.NET web application? My aim is to extract all files from a specific directory recursively.

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

Loop through sub directories in directory

August 25, 2022 by Magenaut

I have a directory ‘Folder’ with many subdirectories inside this directory. Inside every subdirectory there are many images. I want to loop through subdirectories in the ‘Folder’ directory, then loop through all images in every directory to export the images out to Excel, with images from each subdirectory in one Excel worksheet.

Categories ASP.NET, Q&A Tags asp.net, c#, directory, excel, subdirectory Leave a comment
Older posts
Page1 Page2 … Page11 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