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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:30:55+00:00 2026-05-18T10:30:55+00:00

my problem is this: i want to create a server control that inherits System.Web.UI.WebControls.Button

  • 0

my problem is this:
i want to create a server control that inherits System.Web.UI.WebControls.Button
but gives it special capability, now what do i mean?
i want my button to be a confiorm button that will work like so:

renders to the page as a button of lets say cancel
after the user clicks it i want to catch the click event (within the server control)
and now after the click makeing the button not visible and makeing some kind of content placeholder (that will render from the server control) visible.
that content place holder will have 2 buttons inside of it:
yes and cancel

i want the programmer that adds this control to be able to register a function to the click event of the yes button.

and the second cancel confirmation button should make the first button appear agian.

(i know how to do this all in the client side but this time i need it all as server events)

my question is this: how do i catch the click event? i want it all to be handled inside the server control itself. so a programmer that adds this control wont have to worry about anything but just needs to register to the click event of the “yes” button

thank you

  • 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-18T10:30:56+00:00Added an answer on May 18, 2026 at 10:30 am

    Since you want to have multiple controls in your server control you’ll have to inherit from the CompositeControl class and manually add each control and manage the different controls visibility. To add the event handler, use the AddHandler keyword.

    AddHandler YourButton.Click, AddressOf SubThatHandlesTheButtonClickEvent
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This problem is easy fixed clientside. But for performance I want to do it
I have a DataPager control that looks like this: <asp:DataPager ID=page1 PagedControlID=ExperienceList runat=server PageSize=3
I have researched this problem but it is mostly from people who want to
I have created this Fiddle with this code: This is my problem I want
I know the title is somewhat confusing, my problem is this: I want to
I have this problem: I want to generate a new source code file from
I'm experiencing this problem: I want to add the Google Maps API to my
I Have two problem in this Case : I want to pass a JSON
I have this problem since I'm beginning in OOP programming I want to close
I came across this problem when I want to check what I input is

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.