I would like to attach a file on a web page and save it in TFS.
I am using the asp.net fileupload control to save the file . Can anyone please tell me how I can insert the accessed file from fileupload control into tfs ?
Here is my code :
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"));
}
}
Try this, it worked for me in aspx.vb world :o) Rgds, Mav.