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 446479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:28:29+00:00 2026-05-12T21:28:29+00:00

we have a UserControl to handle User cancellations, that is used in a few

  • 0

we have a UserControl to handle User cancellations, that is used in a few places. This has a couple of input fields and a submission button. When they submit the User’s status is updated and a few other things are done and a feedback message displayed.

On one of the pages which includes the control, after the User has successfully cancelled their submission via the UserControl we need the page to be notified somehow so it can call one of its methods and update its display [in this case, the User’s status, which was attending and is now cancelled].

How do we link these up? I’d guess at something involving delegates and event handlers but don’t have much experience with them so don’t know if I’d be heading down a blind alley…

One very hacky solution would be for the UserControl to cause a re-direct and then have the page monitor the session or a query string parameter etc., but just typing it has made me shiver so would have to be very much a last resort.

If any more info is needed, please ask and I’ll provide it.

  • 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-12T21:28:30+00:00Added an answer on May 12, 2026 at 9:28 pm

    This should be pretty easy. Add a delegate event to your UserControl as follows:

    public event EventHandler UserCancelled;
    

    Then, in your user control at the end of the cancellation method, just call the delegate:

    if (this.UserCancelled!= null)
    {
       this.UserCancelled(this, new EventArgs());
    }
    

    Then, just add a handler to the event on your user control’s aspx markup:

    OnUserCancelled="UserControl1_UserCancelled"
    

    And finally, add a handler to your page:

    protected void UserControl1_UserCancelled(object sender, EventArgs e)
    {
        // Your code
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a user control that has 2 controls A and B within it.
I have a winforms app that uses a UserControl. The user control's job is
I have a UserControl with something that does some background work. When thing has
I have a usercontrol that has a popup that displays another usercontrol when the
So I have this idea of creating a asp.net user control, to handle all
I have a user control that will handle images on a form. But depending
I have an UserControl that contains a Button : <UserControl> <Button> </UserControl> I want
I have a UserControl with a Border element within it that I want to
I have a LinkButton within a User Control and it has handled with: Private
I have a UserControl that incorporates a textbox. I want to set the keyboardfocus

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.