filename from database in fileupload control

Posted by Sugi under C# on 11/28/2012 | Points: 10 | Views : 3161 | Status : [Member] | Replies : 1
how to Display filename from database in fileupload control on edit option ..




Responses

Posted by: Sandhyab on: 11/29/2012 [Member] Starter | Points: 25

Up
0
Down
protected void upload(object sender, EventArgs e)

{
HttpFileCollection files = Request.Files;
for (int i = 0; i < files.Count; i++)
{
HttpPostedFile file = files[i];
string filename = file.FileName;
string path = Server.MapPath("~/");
file.SaveAs(path + filename);
Response.Write("file " + filename + " uploaded<br/>");
}
}


Sugi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response