473,387 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Custom control click event

115 100+
Hi

I have created a custom control that contains a click event within it. Is there any way that you can then repurpose the click event when calling the control.

Lets say my custom control is a button.

As a standard i want it to redirect on click.

All the above i have working.

Can i now take my custom control and change what the click event does without altering the base class?
Dec 7 '10 #1
1 1801
Hi if u want to perform click event u can call in the constructor like,
this.PerformClick();
if u send ur code i cud help u more.
Dec 26 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Tamir Khason | last post by:
I build user control, consists of different things (e.g label, image, etc.) I want to handle click (and other) events, however I can not do it until I do not assign event handler for each control...
0
by: John Baro | last post by:
I have a custom control that is purely GDI+ drawn (no contained controls). When I inherit from UserControl, the control receives the onEnter event when clicked on. When I inherit from Control...
0
by: Carolyn Vo | last post by:
I've got a class called ReportTemplateControl.cs that inherits from DataGrid, and I have a custom web control called ReportTemplateCustomControl that I reference ReportTemplateControl inside of. ...
2
by: Oney | last post by:
I want to open a popup window when user click the web server button control When user click the button, only OnClik="OpenWindow(12)" is sent but no event happend no popup opened.After...
4
by: The Alchemist | last post by:
I am having a problem with a dynamically-generated Datagrid. It is important to point out that this problem does not exist with a design-time created Datagrid, but only with a dynamically generated...
1
by: dan | last post by:
Hi NG, i have have a strange problem with a Click Event in a custom control. The OnClick method assigned to a Link Button gets invoked, but the method called in that method is ignored. Instead,...
2
by: semesm22 | last post by:
is there any way that i can create a click event for a label that is part of the web control library....i want to use a label in a user control, and when the user clicks one the user control i...
1
by: Vishal Gupta | last post by:
Hello: I have a calendar control that defaults to today as the selected date. Problem is, if the user clicks on the selected date then since there is no change in date the SelectedChanged does...
0
by: William Main | last post by:
I have the following code ImageMap image1 = new ImageMap(); image1.Click += new ImageMapEventHandler(ImageMap_Click); image1.HotSpotMode = HotSpotMode.PostBack; image1.ImageUrl =...
5
by: vijeyashobana | last post by:
Hi all I have a .ascx with a button and dropdownlist controls. When I click it I want to display some values in the dropdownlist. But on btn_click I don't see the values in the ddl. When I debug I...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.