473,414 Members | 1,711 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,414 software developers and data experts.

user control events

How do you add an event to a user control? For example, I'd like to add an
event to add to the leave event of a custom textbox. I know I can override
the existing leave event, but this is not what I'm trying to do.

Thanks for any help.

Bernie Yaeger
Nov 20 '05 #1
3 972
"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message
news:en**************@TK2MSFTNGP12.phx.gbl...
How do you add an event to a user control? For example, I'd like to add an event to add to the leave event of a custom textbox. I know I can override the existing leave event, but this is not what I'm trying to do.


Please read the "Visual Basic Language Concepts\Walkthrough: Declaring and
Raising Events" part in the VB.NET documentation, this should help you.

sincerely,
--
Sebastian Zaklada
Skilled Software
http://www.skilledsoftware.com
************************************
SQL Source Control 2003 - for
SQL Server Source Safe integration
and custom databases documentation
Nov 20 '05 #2
* "Bernie Yaeger" <be*****@cherwellinc.com> scripsit:
How do you add an event to a user control? For example, I'd like to add an
event to add to the leave event of a custom textbox. I know I can override
the existing leave event, but this is not what I'm trying to do.


Handle the control's event and raise a custom event in your usercontrol:

<http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconUnderstandingEventHandlers.asp>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Tx Blum, Herfried - figured it out; it's really pretty simple.

Thanks again,

Bernie

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:un**************@TK2MSFTNGP12.phx.gbl...
* "Bernie Yaeger" <be*****@cherwellinc.com> scripsit:
How do you add an event to a user control? For example, I'd like to add an event to add to the leave event of a custom textbox. I know I can override the existing leave event, but this is not what I'm trying to do.
Handle the control's event and raise a custom event in your usercontrol:

<http://msdn.microsoft.com/library/en...standingEventH
andlers.asp>
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Shourie | last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle. 1) MainPage_load 2) User control1_Load user clicks a...
1
by: Earl Teigrob | last post by:
PROBLEM: When a user control is loaded into a PlaceHolder control more than once, the events do not fire on the first click of a control on the dynamically loaded user control. In other words, the...
5
by: George Durzi | last post by:
I have a simple user control with a text box and a submit button. When the user enters some text into the textbox and clicks the submit button, a record is created in the database. I'm using...
10
by: George G. | last post by:
Hi there, I am busy writing a new asp.net application and I am reusing some of my existing asp functions and methods in a user control. I need access to session, request and response in some of...
4
by: thomson | last post by:
Hi all, i do have a user control with 4 buttons, and all the events are firing properly, My problem is that i need to right an event handler in the user control, which gets fired after a...
4
by: louise raisbeck | last post by:
Resending this as own topic as didnt get answer from original. Would be grateful for a response from anyone that knows. Thanks. Hi there, I found your post really helpful..but i wondered if, once...
6
by: Art | last post by:
Hi I'm new at this and need some help. I have a "solution" with 2 projects - the main project and a library. The library is simple, it contains a text box that will appear many times in the form...
1
by: Israel | last post by:
The problem: I want to know, definitively when a slider loses focus after a user has started sliding and hasn't released the mouse yet. It appears that this is captured with the WM_ACTIVATEAPP...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
2
by: rn5a | last post by:
Assume that a user control (MyUC.ascx) encapsulates 2 TextBoxes with the IDs 'txt1' & 'txt2' respectively. To use this user control in an ASPX page, the following Register directive will be...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.