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

Results from Db outputted twice
Hey guys.. for come reason my data is outputted twise shown in the image below and i cant figure out

rand() function
just a general question guys a girls, is the rand() function 100% random or is it based on time?

session checking in page load
hai all I have a web site is www.Mryas.com in this my login page is Page1.aspx its co

multipart emiail forms
Hi All,

I am new to the boards and I've been working on a form (which is rather massive, imo

PHP Cannot redeclare class
I have 6 files, and two of them do not seem to want to play well. I keep getting a "Cannot rede

MS Exchange 2007 integration with ECC 6.0
Hello Experts,
We have ECC 6.0 and MS Exchange 2007. We need to integrate ECC 6 and MS Excha

IF Statement & Two Tables With Different Echoes
I'm retrieving two tables in a single query using UNION ALL, like so:

Code: $query = "SE

Something like an INI editor or a DelimitedText-Editor
Hi all,

Am very, very, very new to PHP and not sure if I should be posting this to a Javascri

Only add new information from XML to MySQL
What I am doing, is taking a xml file, and adding the values to a database. However, what I want to

mysql_query returning boolean instead of mysql ressource
Hi,

I seem to have a weird issue with the php command mysql_query. I pass 2 arguments the que

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