Fileupload inside Updatepanel which in Usercontrol?

i am doing Fileupload using asp.net 3.5 with asp.net ajax.In that i am using Usercontrol MainPage.ascx Page:In this page i am using UpdatePanel inside Fileupload control. Demo.aspx:In this page also i am using Updatepanel. i am drag MainPage.ascx usercontrol inside this UpdatePanel which is in Demo.aspx.Question: When i drag the Mainpage….

via Asp.Net Developed Tutorials » Search Results » ajax:

Fileupload inside Updatepanel which in Usercontrol?

i am doing Fileupload using asp.net 3.5 with asp.net ajax.In that i am using Usercontrol MainPage.ascx Page:In this page i am using UpdatePanel inside Fileupload control. Demo.aspx:In this page also i am using Updatepanel. i am drag MainPage.ascx usercontrol inside this UpdatePanel which is in Demo.aspx.
Question: When i drag the Mainpage.ascx Usercontrol on Demo.aspx . Here i am getting the Fileupload.HasFile is getting null .If anybody knows Plz.
Please do the needfull.
…………………………………..

You need to add a PostBackTrigger for your UploadControl because it is inside an update panel. (Maybe you need an AsyncPostBackTrigger)
…………………………………..

A standard fileupload control cannot be used in an ajax-postback. You could use an AsyncFileUpload control from the ASP.NET Ajax Control Toolkit. This control can send files in an ajax-postback and has some other options that you can see in the demo.
If you use the AsyncFileUpload, make sure to use the ToolkitScriptManager from the Ajax Control Toolkit instead of the default ScriptManager.

For more info: Fileupload inside Updatepanel which in Usercontrol?

Asp.Net Developed Tutorials » Search Results » ajax

Fileupload inside Updatepanel which in Usercontrol?

Share this post:

Related Posts

Leave a Comment