Click here to Skip to main content
15,891,868 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using ajax tab control in aspx page.
In that control i am using fileupload control to upload the image.
but fileupload control is not able to get any file.

if(fileupload1.hasfile==true)
{
string f=filupload1.filename.tostiring();
string fpath="~/image/image/"+f;
fileupload1.saveas(mappath(fpath));
}

but it doesnot able take file.
so m getting error in if condition.

can any one help me out.
thankx in advance.
Posted
Updated 17-Feb-10 22:26pm
v2

You can't upload file with file upload control in update panel directly.

refer the links here.

http://aspalliance.com/1442_Building_AJAX_Enabled_File_Uploading_System_with_Progress_Bar_Using_ASPNET_20.all[^]

or you can use some third party api.

http://ajaxuploader.com/[^]
 
Share this answer
 
File upload will need full postback to work on.

Try:
Post back trigger for the update panel
<asp:PostBackTrigger ControlID="fileupload1" />
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900