?
Solved

Using repeater buttons as triggers for an external update panel

Posted on 2008-06-19
2
Medium Priority
?
1,259 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

762 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