有谁知道可用于从ASP.NET提供任意文件(可能是动态生成的和临时的)的基类吗?提供从ASP.NET生成的文件的样板
那种界面我想会非常简单,看起来像这样的:
class FilePage : Control // I think...
{
protected Filename { get; set; } // the filename to dump out
protected bool Delete { get; set; } // Delete the (temporary) file when done?
protected string ContentType { get; Set; } // MIME type of the file
abstract protected void BindData();
}
,你会从中获得并在抽象方法,创建您需要的任何文件,设置属性并让基类处理其余的部分。
我目前的用例是我想将数据导出为SQLite数据库。
编辑:
- Superfiualy相关this question除了我必须生成的临时文件。
...这基本上是编辑帖子的完美方式。谢谢! – swilliams 2009-08-19 18:07:59