Add this attribute in form tag.
enctype="multipart/form-data"
HTML
<form id="form1" runat="server" enctype="multipart/form-data">
<div>
<input type="file" id="file1" name="file1" />
<asp:Button ID="btnUpload" runat="server" Text="Upload" OnClick="btnUpload_Click" />
</div>
</form>
C#
protected void btnUpload_Click(object sender, EventArgs e)
{
HttpPostedFile postedFile = Request.Files["file1"];
if (postedFile != null && postedFile.ContentLength > 0)
{
string fname = Path.GetFileName(postedFile.FileName);
postedFile.SaveAs(Server.MapPath("~/Files/" + fname));
string path = "~/Files/" + fname;
//Save this path in SQL
}
}