if (Fup1.HasFile)
{
string FilePath = "";
string[] a = new string[1];
string fileName = "";
string FullName = "";
try
{
if (Fup1.FileName.Length > 0)
{
a = Fup1.FileName.Split('.');
fileName = Convert.ToString(System.DateTime.Now.Ticks) + "." + a.GetValue(1).ToString();
FilePath = Server.MapPath(@"~\FolderName");
Fup1.SaveAs(FilePath + @"\" + fileName);
FullName = FilePath + @"\" + fileName;
}
}
catch
{
}
}
You can try with this.
If with this error is not solved then try,-
FileUploader.Atribute.add("Value",FileUploader.PostedFile);
In PageLoad.
Hope this can help you.