[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Using repeater buttons as triggers for an external update panel

Posted on 2008-06-19
2
Medium Priority
?
1,265 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Screencast - Getting to Know the Pipeline
Suggested Courses

831 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