Solved

Using repeater buttons as triggers for an external update panel

Posted on 2008-06-19
2
1,250 Views
Last Modified: 2012-08-13
Hello experts! I have a question that might be very simple for all of you but has given me plenty of trouble.
I have a repeater with a given datasource, and inside that repeater I generate lots of products. Each product has a "add to shopping list" button, which is meant to Update an update panel located outside of my repeater (the repeater is _not_ inside of this update panel).

I tried giving my buttons dynamic ids but " ID='<%# Eval("ID_Projecto").ToString() %>' " gives me an error :( so I cant dynamically add them as triggers for the other update panel, since I can't find out which ID the repeater is generating for them.

So... if my repeater was called "rep", and my button was called "btn" and my other update panel was called "shopping_list", what should I be doing?

Thank you for your feedback in advance, this is quite urgent for me!
0
Comment
Question by:vnobre
2 Comments
 
LVL 16

Expert Comment

by:burakiewicz
Comment Utility
on the btn click event call
shopping_list.Update(); and it should update the panel
0
 

Accepted Solution

by:
vnobre earned 0 total points
Comment Utility
burakiewicz:
The shopping_list.Update() didn't work but I found out a very easy way to make every repeater button work as a trigger for the update panel, all I had to do was declare the repeater as the trigger, as in:

<asp:UpdatePanel ID="shopping_list" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="rep" />
</Triggers>
<ContentTemplate>
</ContentTemplate>
</asp:UpdatePanel>

Thank you again for your feedback!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now