I need to add the following field at my form
<input type="file" class="input-file" />
I create model and describe this field (the last field)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace CorePartners_Site2.Models
{
public class FeedbackForm
{
public string Name { get; set; }
public string Email { get; set; }
public string Phone { get; set; }
public string Company { get; set; }
public string AdditionalInformation { get; set; }
public HttpPostedFileBase ProjectInformation { get; set; }
}
}
and create
@Html.TextBox(null, null, new { type="file", @class="input-file" })
but it doesnt work, I get some exception. What's wrong?