Answered by:
Using a Repeater inside of UpdatePanel with UpdateProgress

Question
-
User879393986 posted
Hello there, 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.
Wednesday, March 5, 2014 8:31 AM
Answers
-
User879393986 posted
I have this all working now.
After much digging I found this: http://stackoverflow.com/questions/8716362/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.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, March 6, 2014 1:35 PM
All replies
-
User879393986 posted
I have this all working now.
After much digging I found this: http://stackoverflow.com/questions/8716362/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.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, March 6, 2014 1:35 PM -
User2075212911 posted
I was able to use this in my Page directive: ClientIDMode="AutoID"Hi xanalyth,
Why you try to use the ClientIDMode as "AutoID" model?
Sunday, March 9, 2014 1:08 AM -
User879393986 posted
Doing so allowed my UpdatePanel to see the LinkButton control within the Repeater. Without it I would get an error stating that the control was not found. I did try the code in the first answer in that link that I posted and it worked okay. However, the second answer states that using the AutoID is a better match for what I was trying to do - so I went with that solution instead.
Thanks.
Monday, March 10, 2014 9:04 AM