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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:15:49+00:00 2026-06-02T16:15:49+00:00

[DefaultEvent(MyCustomEvent)] public partial class WebUserControl1 : System.Web.UI.UserControl { public delegate void onButtonClick(object sender, Myeventargs

  • 0

[DefaultEvent(“MyCustomEvent”)]

public partial class WebUserControl1 : System.Web.UI.UserControl
{
    public delegate void onButtonClick(object sender, Myeventargs e);
    public event onButtonClick btnHandler;

 protected void ASPxButton1_Click(object sender, EventArgs e)
    {
        if (btnHandler != null)
        {
            btnHandler(this,e);
        }
    }

}

this code can work with
public partial class jscript : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

        XFButton1.MYClick += new EventHandler(XFButton1_MYClick);
    }

    void XFButton1_MYClick(object sender, EventArgs e)
    {
       ASPxLabel1.Text = "Hello";
    }

but the problem is i want it automatically generate a new event when i double click on the button. can i done this by using a web user control ?

  • 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-02T16:15:50+00:00Added an answer on June 2, 2026 at 4:15 pm

    too bad to tell you that web user control may not able to do like that… pls read this http://dotnet-framework-aspnet.itgroups.info/32/9/thread-796040.html.

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

Sidebar

Related Questions

I have a custom web part placed on one of the application page in
I have a web app which plots points with SVG, I want to add
I have <a href=test.php?id=2 class=confirm_delete>Click to proceed</a> and following javascript. When I click on
One thing that annoys me is that in a default Event, Sender is of
Normally, if I wish to stop a default event in mootools I can do
In VS2008, if I double click on the event handler VS creates a default
It is said that when we handle a "click event", returning false or calling
I am trying to overwrite a event handler of MouseWheel for a ScrollViewer. Since
I've just created a WPF User Control and i noticed that the default event
I am writing an app where the user should be able to alter 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.