473,405 Members | 2,187 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,405 software developers and data experts.

handling events inside a userControl

I have a webform that contains a placeholder control that is filled with various usercontrols.
I have an error/info message label on the webform (for interface clenliness). Sometimes the the usercontrol has to populate the message label on the webform. How can I have the webfrom respond to this type of request from the user control?

Thanks
Nov 18 '05 #1
5 1448
Well, I think your Subject indicates you're thinking in the right direction.
Have the UserControl raise an event, and have the WebForm handle the event.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Xaviero" <Xa*****@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com...
I have a webform that contains a placeholder control that is filled with various usercontrols. I have an error/info message label on the webform (for interface clenliness). Sometimes the the usercontrol has to populate the message label
on the webform. How can I have the webfrom respond to this type of request
from the user control?
Thanks

Nov 18 '05 #2
Actually thats my problem,

How do I have the usercontrol raise the event? And how do I have the webform handle the event. Sorry for being such a newbie
"Kevin Spencer" wrote:
Well, I think your Subject indicates you're thinking in the right direction.
Have the UserControl raise an event, and have the WebForm handle the event.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Xaviero" <Xa*****@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com...
I have a webform that contains a placeholder control that is filled with

various usercontrols.
I have an error/info message label on the webform (for interface

clenliness). Sometimes the the usercontrol has to populate the message label
on the webform. How can I have the webfrom respond to this type of request
from the user control?

Thanks


Nov 18 '05 #3
Hey I was glad too to see that you at least realized you needed to raise an event. You'll see some who will suggest setting session variables, and lots of other nasty stuff.

http://www.oreilly.com/catalog/proga...pter/ch14.html
scroll down about 1/4 of the page to "handling events".

--Michael

"Xaviero" <Xa*****@discussions.microsoft.com> wrote in message news:04**********************************@microsof t.com...
Actually thats my problem,

How do I have the usercontrol raise the event? And how do I have the webform handle the event. Sorry for being such a newbie


"Kevin Spencer" wrote:
Well, I think your Subject indicates you're thinking in the right direction.
Have the UserControl raise an event, and have the WebForm handle the event.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Xaviero" <Xa*****@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com...
I have a webform that contains a placeholder control that is filled with

various usercontrols.
I have an error/info message label on the webform (for interface

clenliness). Sometimes the the usercontrol has to populate the message label
on the webform. How can I have the webfrom respond to this type of request
from the user control?

Thanks



Nov 18 '05 #4
Thanks,
It looks like I need to pay more attention when I read my books, I have that one. lol

"Raterus" wrote:
Hey I was glad too to see that you at least realized you needed to raise an event. You'll see some who will suggest setting session variables, and lots of other nasty stuff.

http://www.oreilly.com/catalog/proga...pter/ch14.html
scroll down about 1/4 of the page to "handling events".

--Michael

"Xaviero" <Xa*****@discussions.microsoft.com> wrote in message news:04**********************************@microsof t.com...
Actually thats my problem,

How do I have the usercontrol raise the event? And how do I have the webform handle the event. Sorry for being such a newbie
"Kevin Spencer" wrote:
Well, I think your Subject indicates you're thinking in the right direction.
Have the UserControl raise an event, and have the WebForm handle the event.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Xaviero" <Xa*****@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com...
> I have a webform that contains a placeholder control that is filled with
various usercontrols.
> I have an error/info message label on the webform (for interface
clenliness). Sometimes the the usercontrol has to populate the message label
on the webform. How can I have the webfrom respond to this type of request
from the user control?
>
> Thanks

Nov 18 '05 #5
Here's a link to download the Microsoft .Net SDK:

http://www.microsoft.com/downloads/d...displaylang=en

It has everything you need, including articles, tutorials, examples, and a
complete reference.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Xaviero" <Xa*****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
Actually thats my problem,

How do I have the usercontrol raise the event? And how do I have the webform handle the event. Sorry for being such a newbie

"Kevin Spencer" wrote:
Well, I think your Subject indicates you're thinking in the right direction. Have the UserControl raise an event, and have the WebForm handle the event.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Xaviero" <Xa*****@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com...
I have a webform that contains a placeholder control that is filled
with various usercontrols.
I have an error/info message label on the webform (for interface

clenliness). Sometimes the the usercontrol has to populate the message label on the webform. How can I have the webfrom respond to this type of request from the user control?

Thanks


Nov 18 '05 #6

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

Similar topics

3
by: Todd Schinell | last post by:
Back in July, Jeffery Tan posted this: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=OWOTdf0VDHA.2296%40cpmsftngxa06.phx.gbl In response as to how to get click events from a...
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...
4
by: Andy | last post by:
Alright, I am beyond confused here and need some guidance. I need a C# only sample. I have a simple Page and within it i am creating a user control (ascx). The user control contains textboxes,...
12
by: scsharma | last post by:
Hi, I am working on creating a webapplication and my design calls for creating main webform which will have menu bar on left hand side and a IFrame which will contain all the forms that are shown...
16
by: schneider | last post by:
I can't get any of the Key events to fire in my UserControl. The control only contains a few labels. This is really annoying.. Anyone know whats going on? Thanks, Schneider
5
by: snesbit | last post by:
If a screen is made up of several user controls and those user controls contain various packaged or standard controls such as a grid, how do you raise both standard and custom events from the user...
7
by: Jay Douglas | last post by:
Greetings, I have a Windows form application that (naturally) instantiates all sorts of objects. I have a base object that contains an event. Lots of other objects inherit from this event. ...
1
by: johnson.bj | last post by:
I have a relatively minor problem that has been bugging me for a long time. I have created a user control which consists of a few panels and labels. What I want to do with this user control is to...
0
by: qreg | last post by:
I've got a problem with usercontrols and delegating events from the controls that are inside such a usercontrol control. First for a brief description of the problem. I have a user control...
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
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
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...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.