Solved

Using repeater buttons as triggers for an external update panel

Posted on 2008-06-19
2
1,254 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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!
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

761 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