Add trigger to UpdatePanel programmatically


Posted on 16th Feb 2014 07:03 pm by admin

Hi,I'm working on a website which uses AJAX and Masterpages. What I have is an AJAX UpdatePanel which contains the ContentPlaceHolder on the MasterPage.However, on one page I have a FileUpload control, which means I have to add the Submit button as a Postback trigger to the UpdatePanel, otherwise the file upload will not work. I've tried doing this both from the MasterPage code file and the Page code file itself without any luck...The code from my masterpage attempt: If Page.Request.RawUrl.Contains("UploadPage.aspx") Then
Dim trigger As UpdatePanelControlTrigger = New PostBackTrigger()
Dim s As Button = page.FindControl("submitBut")
trigger.ControlID = s.ID
up.Triggers.Add(trigger)
End IfWhere up is the id for the update panel.I get an error message saying: A control with ID 'submitBut' could not be found for the trigger in UpdatePanel 'up'.Any help would be greatly appreciated.Thanks in advance
Filed under: updatepanel add trigger programmatically

No comments posted yet

Your Answer:

Login to answer
345 Like 16 Dislike
Previous forums Next forums
Other forums

Passing Arguments to execlp()
I'm writing a program that mimics a unix shell. It's supposed to take commands with arguments and ex

Embedding flash object in Else statement
This is my first major project in PHP and I'm having some trouble embedding a flash object in an Els

Multi Dimensional Array Append
Hi Guys

I have a function that returns a multidimentional array eg

$result = functio

mail() problem
Hi Guys,

I've set up a contact email form. It sends the information fine, but it sends it to

Oracle Connectivity
Hi Every One,

Can we access SAP from oracle database.If it possible then please spec

Apple's revamped lineup arrives

I'm personally curious about the magic mouse.. a multi-touch concept sounds like it could be nea

unserialize help, getting errors
hi all ,
I got a form with 6 fields (2 input and 4 select box), when the page loads one block is

mail()
Hi all. I have a problem with emails. I am trying to set up a mail system where customers can subscr

How to know if online site made with PHP
Hello,
I see some sites that does not display extensions at all , for example:

www.site.co

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash