By tag: path
0
kicks
Building a File Path with Path.Combine (.NET)
When using a variety of input methods to accept a file path and file name, the format of the results can vary. To avoid the problems of checking for path separator characters and adding or removing them as required, .NET provides a method to provide this.
0
kicks
How to convert an app relative path to an absolute without ResolveUrl
Today, I discovered a way to do this without a Control reference. The System.Web.VirtualPathUtility class has some very useful methods for manipulating paths, including one that converts from an app relative path to an absolute path. Instead of Control.ResolveUrl, just call VirtualPathUtility.ToAbso...