fileupload.hasfile always return false ???
-
if (FileUpload1.HasFile == true) { FileUpload1.SaveAs(Server.MapPath("~/AdminSection/Attachment/"+FileUpload1.FileName.ToString())); } hi, anybody knows, what may be the possibility by which this condition alwz return false. :)
In your case are you using AJAX? If yes then FileUpload1.HasFile return always false.
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
-
if (FileUpload1.HasFile == true) { FileUpload1.SaveAs(Server.MapPath("~/AdminSection/Attachment/"+FileUpload1.FileName.ToString())); } hi, anybody knows, what may be the possibility by which this condition alwz return false. :)
Priyagdpl wrote:
what may be the possibility by which this condition alwz return false.
I am agree with Blue_Boy. I guess you are using FileUpload Control inside update panel. Here is an workaround. UpdatePanel-FileUpload Control[^]
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
-
if (FileUpload1.HasFile == true) { FileUpload1.SaveAs(Server.MapPath("~/AdminSection/Attachment/"+FileUpload1.FileName.ToString())); } hi, anybody knows, what may be the possibility by which this condition alwz return false. :)
You cannot upload using AJAX. Rather if it is withing updatepanel use PostBackTrigger to do your job.:rose:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
-
You cannot upload using AJAX. Rather if it is withing updatepanel use PostBackTrigger to do your job.:rose:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.