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

  • SEARCH
  • Home
  • 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 5843181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:07:07+00:00 2026-05-22T12:07:07+00:00

I add buttons dynamically.. e.g. Button newButton=new Button(); Now i want each button to

  • 0

I add buttons dynamically.. e.g. Button newButton=new Button();
Now i want each button to be triggered. So i wrote them the following events:

    public void response_Click(object sender, EventArgs e)
{

}

public void edit_Click(object sender, EventArgs e)
{

}

public void quote_Click(object sender, EventArgs e)
{

}

  Button quote = new Button();
    Button reply = new Button();
    Button edit = new Button();

    quote.ID = "quote";
    reply.ID = "reply";
    edit.ID = "edit";

How do i trigger them, as soon as the user clicks on the button..will my functions above be triggered? do i need to do the following:

this.Clicked+=quote;
this.Clicked+=reply;
this.Clicked+=edit;

if i do need to do that..where do i put those lines of code?

i use visual studio 1010. asp.net

  • 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-05-22T12:07:08+00:00Added an answer on May 22, 2026 at 12:07 pm

    You can do like..

    quote.Click += new EventHandler(quote_Click);
    reply.Click += new EventHandler(response_Click);
    edit.Click += new EventHandler(edit_Click);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to add haptic feedback to my application's buttons and control them programmatically
New to javascript and jQuery, but I'm trying to dynamically add buttons and then
I'm creating buttons dynamically on an Excel userform with the following code: With Me.CurrentFrame.Controls.Add(Forms.CommandButton.1)
I ve created the 8 buttons dynamically.I want to add all these buttons to
I tried to add buttons, textboxes and text to tableview. I want the row
I have several wpf pages with update/delete/add buttons. I want to display to the
I am using C#.net I want to add custom edit/delete buttons to my GridView1
I wrote a little Java servlet that would dynamically generate an image button given
I'm dynamically generating radio buttons in my code behind and assigning javascript to them
So, I'm trying to dynamically add a button to a site to give the

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.