[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

Repeater ItemCommand

Asked by BobCSD in Programming for ASP.NET

I'm using a repeater to list rows in a table. I have a button for each row. On click, I want to know the ID of the row.

I can store the ID in a hidden field, but is there a better way?
Also, I want to know another value that I don't wish to display, should I use a hidden field?

Then on the ItemCommand, what do I do to know the button has been clicked and if so, retrieve the values in those hidden fields, or ID's via other means you suggest?

Please provide the code in VB if possible, or C# if you can't. I can convert. But don't direct me to a page unless it specifically answers this question, as I've been looking all morning for something like this, and I do get tired of those who google stuff like "ItemCommand" and post a link and hope to get points for doing what I've already done and not bothering to answer the question.

thanks!
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
<asp:Repeater ID="repGuide" runat="server">
            <ItemTemplate>
                <tr>
                    <td class="ReportCellText ReportTableBorder">
                        <asp:HiddenField ID="hfQuestionAnswerId" runat="server" />
                        <asp:HiddenField ID="hfQuestionValueId" runat="server" />
                        <asp:Label ID="lblQuestion" runat="server"></asp:Label>
                        <asp:Button ID="btnEdit" runat="server" Text="Edit" />
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
 
 
    Protected Sub repGuide_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles repGuide.ItemCommand
 
 
???
 
    End Sub
[+][-]09/15/09 11:14 AM, ID: 25337627Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Programming for ASP.NET
Sign Up Now!
Solution Provided By: guru_sami
Participating Experts: 1
Solution Grade: A
 
[+][-]09/15/09 11:42 AM, ID: 25337905Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_EXPERT_20070906