473,513 Members | 2,424 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

where is my user control?

Hi

I've added a MyUserControl called MyUserControl1 to my aspx page.
the user control fires an event MyEvent which I want the page to handle.

I want to be able to write (in the codebehind: MyPage.aspx.cs)

MyUserControl1.MyEvent += someDelegate

the problem is that I have no handle on the usercontrol. where do I find it?
VS2003 does not initialise it in the codebehind. Is there some magic here?

mvh
Andreas
Nov 19 '05 #1
1 971
> the problem is that I have no handle on the usercontrol. where do I find it?
VS2003 does not initialise it in the codebehind. Is there some magic here?


Just to answer myself (and anyone who might wonder about the same thing)
there IS black magic happening here.

You declare the variable in the codebehind-file (same type and same
identifier) and in run-time it will automagically have been initialised by
the page.

ie. just use the variable for all its worth, in run-time it won't be null.

mvh
Andreas
Nov 19 '05 #2

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

Similar topics

1
1483
by: paja | last post by:
Hello All I have been trying looking for Slider control required for one of the application. I have looked in default Form controls, then tried to add controls from COM components, but could not...
1
1868
by: Richard | last post by:
Hello MyMainWebPage.aspx contains MyUserControl.ascx MyUserControl.ascx has a DataTable Property MyDataTable
0
1136
by: dina | last post by:
I am using one main aspx page, in which i am loading different user controls for different web pages. At one place, when i load a user control from another user control and come back to the same...
6
11269
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
4
3791
by: Brian Shannon | last post by:
I have 3 combo boxes and two date text boxes on a .aspx page. The user can fill in any of the 5 controls or none to filter a datagrid. I was hoping someone could explain how to efficiently build...
2
2287
by: Phillip N Rounds | last post by:
I'm working on a UserControl ( ASP.NET 1.1, C#, VS 2003), where I can't manage the state of multiple controls correctly. The controls have the following constraints 1: It has two possible...
1
3395
by: rdemyan via AccessMonster.com | last post by:
I'm trying to implement a licensing scheme. There are three types of licenses: Trial - good for 30 to 60 days Interim - good for 1 year Fully Paid - no expiration Everything is working fine...
1
1995
by: tony | last post by:
Hello! I just want to find out how the system find the name to set on a assembly User control dll. I have done this. 1. Create a user control - Here the namespace was set by the system to...
5
2047
by: ThunderMusic | last post by:
Hi, I'd need to find (or develop) a control of a map (worldwide if possible) where a user can click and drag to select an area by distance from the click point or using a square area (user's...
13
10697
by: tommymo | last post by:
Hi everyone I'm new to this site and the world of ASP.Net C# programming. I have been learning controls and integrating them with a SQL database. So far I have been able to move along and understand...
0
7391
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
7553
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...
1
7120
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
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5697
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,...
1
5100
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...
0
4754
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...
1
809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
466
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.