Advertisement

05.22.2008 at 03:47AM PDT, ID: 23423862
[x]
Attachment Details

Adding programatically created controls as triggers for updatepanel.

Asked by ShopSetup in .NET Framework 3.x versions, Microsoft Visual C#.Net, Visual Studio 2008

Tags: AJAX ASP.NET C#

Hi!
I've been trying and I've been reading but I cannot make this thing work... Adding programmatically created controls as triggers for my updatepanel, sigh.

I have 2 repeaters that creates Headlines and Checkboxes that will later filter out a gridview.
The gridview is within a updatepanel, the repeaters are not.
The checkboxes are created based on data from my database.
The checkboxes CheckedChanged events are fired and the filtering begins.
Works great.

Now I want the gridview to update through a AsyncPostBack.
I've tried added this to both Checkbox_Init and repeater_ItemDataBound
        AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();
        trigger.ControlID = checkBox.UniqueID;
        updGv.Triggers.Add(trigger);

and I've tried this on both locations:
        ScriptManager1.RegisterAsyncPostBackControl(checkBox);

I have been reading and apparently you have to use the ScriptManager1.RegisterAsyncPostBackControl method to make this work but it just wont.

Any ideas?

Thanks for any help...
Start Free Trial
[+][-]05.22.2008 at 08:04AM PDT, ID: 21624441

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET Framework 3.x versions, Microsoft Visual C#.Net, Visual Studio 2008
Tags: AJAX ASP.NET C#
Sign Up Now!
Solution Provided By: ShopSetup
Participating Experts: 0
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628