【发布时间】:2015-01-21 15:56:38
【问题描述】:
我想在网页上附加一个文件并将其保存在 TFS 中。
我正在使用 asp.net fileupload 控件来保存文件。 谁能告诉我如何从fileupload插入访问的文件 控制到 tfs 中?
这是我的代码:
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
{
FileUpload fu = (FileUpload)FormView1.FindControl("FileUpLoad1");
if (fu.HasFile)
{
// I want to know the code changes to the line below :
workitem.Attachments.Add(new Attachment("file accessed from file upload", "comment"));
}
}
【问题讨论】:
标签: c# asp.net tfs webforms tfs-sdk