Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8243313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:28:28+00:00 2026-06-07T21:28:28+00:00

UPDATE I should learn to read error messages more carefully. I forgot to change

  • 0

UPDATE

I should learn to read error messages more carefully. I forgot to change some ID’s in my column specification for the gridview which were the same, which of cause resulted in the “Multiple same ID’s” error.

Thank you for all that read my question and the once trying to help me. Free slaps to my face


I’m trying to get a hold of a OnClick or OnCommand event from an ImageButton that are inside a usercontrol which are inside a GridView. I tried creating the imagebutton so it throws a Command:

<asp:ImageButton runat="server" ID="exchanceButton" 
        Visible="False" ImageUrl="../Images/Icons/Exchange.png" 
        CommandName="exchanceCommand" CommandArgument="1">

And the catch it inside the GridView OnRowCommand, but I get the following error: Multiple controls with the same ID ‘userControlPlan’ were found. FindControl requires that controls have unique IDs. I tried debugging but it doesn’t reach my OnRowCommand at all.

I tried the following guide but with no success: http://msdn.microsoft.com/en-us/library/bb907626.aspx

I also tried to carry the event out by creating my own event inside the UserControl and then assign a listener to each UserControl:

public delegate void OnExchanceClickDelegate(int id);

public event OnExchanceClickDelegate OnExchangeClick;

protected void exchanceButton_Click(object sender, ImageClickEventArgs e)
{
    if (OnExchangeClick != null)
    OnExchangeClick(1);
}

but I get the same error about multiple controls.

Do any of you have any suggestions to how I can raise the event correctly from the ImageButton inside the the UserControl out to the Gridview or something else?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T21:28:30+00:00Added an answer on June 7, 2026 at 9:28 pm

    I fixed the problem. I did have duplicate ID’s in my UserControl. I updated my original question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE: I should have mentioned in the original post that I want to learn
Requirement : Should update MySQL database with that of MS Sql Server updates which
I am trying to create Update trigger which should be invoked only if the
when I read document about asyntask , they say that: should not update UI
I'm using m2eclipse and trying to learn some tapestry. I'm trying to update my
For my test I have the following: test should update holder do holder =
Is there a way to tell a JTable's row filter that it should update
My code looks fine but it is not working as it should because update
UPDATE: sorry my IE 9 was'nt configured well: it should've been set so that
How should I store Birthdate's in MySQL so that I can easily update everyone's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.