Solved

Using repeater buttons as triggers for an external update panel

Posted on 2008-06-19
2
1,251 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
ID: 21822125
on the btn click event call
shopping_list.Update(); and it should update the panel
0
 

Accepted Solution

by:
vnobre earned 0 total points
ID: 21822240
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Syntax error 9 45
Not showing page correctly 3 29
Angular JS Route 3 44
Where can I ask about my ASP.NET MVC project? 6 12
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

948 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

18 Experts available now in Live!

Get 1:1 Help Now