Feed the creative machine

Monday, November 14, 2005

Upload file from web form in ASP .net 2.0

Step 1. Use the ASp .net 2.0 File upload control

Step 2. In the code behind get the path of the folder where you want to upload the file

Step 3.
if (fupControl.HasFile)
{
string sFileName = fupControl.FileName;
sPath = sPath + "\\" + sFileName;
fupControl.SaveAs(sPath);
}

Step 4. You are done

its that simple

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home