Is it possible to write file to th开发者_高级运维e same directory where the c# code that writes this file is ?
I mean something like there is c:\projects\myProject\test.cs
and when there is writeFile operation in test.cs
there is for example new file lest say test1.txt in c:\projects\myProject\test1.txt
I'm running asp.net application.
You're probably looking for Server.MapPath("~/Something.txt")
I think you can also try Application.StartupPath
精彩评论