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

How to Detect it is public_html or httpdocs?
How to check whether it is cPanel or Plesk?

If it found public_html perform <?php incl

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
what is wrong with this

Code: [Select]<?php
if ($_SERVER['HTTP_REFERER'])
{

Can't seem to capture a variable in a chained select
I'm *this* close to having a chained select running but for some reason it doesn't seem to be pickin

If statement help please.
Hello on my site I have 2 content boxes. 1 is for the main content (which is the biggest one) and th

Consuming MII WebService in Java WebDynpro
Hello,

We are facing a strange situation...

We define a transaction in MII to

Help? Need help on project with templates involving mysql and php.
I'm having a hard time explaining what I want but basically here is what I have in place:

-Da

imap: how to save a copy of sent emails to sent elements
Hello my friends,

I am writing an online emailing application with inbox outbox/sent elements

Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages in

FILTER_CALLBACK -- Files?
Hi All,

I'm using the php filter functions to validate my form data. For custom filters, I'm

upload photo limits
ive got a upload photo script and im just trying to make more secure currently it limits size and as

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