inputのtype="file"で添付したファイルをサーバー側で受け取って処理したい。
例としてファイルをbyte配列に変換する。
HTML
<input type="file" name="file" id="file" />
CS
public byte[] File2Array(HttpPostedFileWrapper file)
{
using (MemoryStream ms = new MemoryStream())
{
file.InputStream.CopyTo(ms);
return ms.ToArray();
}
}