Question

I am using ASP .NET 4.0 using C#. I have a web form where all of my layout exists within an UpdatePanel. Inside it I have the following:

Panel for entering search criteria with textboxes and search button

UpdateProgress with animated .gif

Panel with a Repeater that gets populated according to my first sproc (using the search criteria) - inside each row is a LinkButton that when clicked calls my second sproc and populates a Panel within the Repeater row. I am populating the Panel in the code-behind in the ItemCommand event of the Repeater. I use the CommandArgument on the LinkButton for my second sproc. I have a CollapsiblePanelExtender to animate the Panel that contains data from my second sproc.

I have it working but not the way I want. When the search button is clicked the UpdateProgress does show my animated .gif. However, when the LinkButton is clicked within the Repeater datarow my second sproc takes about 6 seconds to process. I want to have an UpdateProgress that shows an animated .gif when this occurs. I tried to fix this by implementing a second UpdatePanel but I could not get the UpdateProgress to fire at all. Any help would be greatly appreciated. Thanks in advance.

Was it helpful?

Solution

I have this all working now.

After much digging I found this: How to do AsyncPostBackTrigger for the LinkButton in the Repeater

I was able to use this in my Page directive: ClientIDMode="AutoID"

I also ended up adding an ImageButton to my Repeater datarow, and whether I click on the LinkButton, ImageButton, or Search button I get the desired result now - the UpdateProgress fires and displays the animated .gif file.

My UpdateProgress resides inside of my UpdatePanel and has an AssociatedUpdatePanelID set to the ID of my UpdatePanel.

I hope this helps someone.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top