
Signature
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
> Having a bit of trouble here. I know that if you want to use a fileupload
> control inside an AJAX update panel then you need to create a trigger for
[quoted text clipped - 5 lines]
>
> Does anyone know a way round this?
> ScriptManager.RegisterPostBackControl does the equivalent in code (you get
> reference to SM with ScriptManager.GetCurrent())
[quoted text clipped - 5 lines]
> method outside an UpdatePanel control has no affect because by default
> these controls do not perform asynchronous postbacks"
Damn, almost worked, but it looks like neither the file upload control nor a
panel implement an appropriate interface:
"Control with ID 'pnlUpload' being registered through
RegisterAsyncPostBackControl or RegisterPostBackControl must implement
either INamingContainer, IPostBackDataHandler, or IPostBackEventHandler."
Leon Mayne - 27 May 2008 10:02 GMT
>> ScriptManager.RegisterPostBackControl does the equivalent in code (you
>> get reference to SM with ScriptManager.GetCurrent())
[quoted text clipped - 12 lines]
> RegisterAsyncPostBackControl or RegisterPostBackControl must implement
> either INamingContainer, IPostBackDataHandler, or IPostBackEventHandler."
Oh wait, I registered the wrong control. I changed it to register the button
instead and it worked:
Dim scmCurrent As ScriptManager = ScriptManager.GetCurrent(Me.Page)
If scmCurrent IsNot Nothing Then
scmCurrent.RegisterPostBackControl(Me.btnUpload)
End If
Thanks Teemu.