I have the following scenario in ASP.NET application: Create a file in a temporary directory and return a link to that file. I implement it as follows:
// get URL to create file
var tempDataOperationsDirectory = Server.MapPath("~/temp/DataOperations/foo1.txt");
// Create file
// Create link:
ButtonViewFile.NavigateUrl = Page.ResolveUrl("~/temp/DataOperations/foo1.txt");
The above works. I am wondering if that's a good approach, and what if any alternatives are there?