Add following code in aspx page under gridview:
<asp:templatefield>
<itemtemplate>
<asp:fileupload id="FUDocs" runat="server" />
<asp:linkbutton id="btnUpload" runat="server" class="btn blue" text="Upload Document File" onclick="btnUpload_Click">
</asp:linkbutton>
</itemtemplate>
</asp:templatefield>
Add following code in code-behind file:
protected void btnUpload_Click(object sender, GridViewUpdateEventArgs e)
{
int index = e.RowIndex;
GridViewRow row = (GridViewRow)gv1.Rows[index];
FileUpload fu = (FileUpload) row.FindControl("FUDocs");
if (fu.HasFile)
{
string file = System.IO.Path.Combine(Server.MapPath("~/Images/"), fu.FileName);
fu.SaveAs(file);
}
}