473,466 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Hosting a user control within a user control

Hi:

When I drop one user control on to the design surface of another user
control I can't seem to get a reference to it. Using the following in host
control doesn't appear to work... protected MyUserControl MyUserControl1.
How do get ref so I can access it's properties?

Thanks,
Charlie
Nov 19 '05 #1
2 1054
I think, you are only allowed to add a Web User Control to a Web Form Page.
Bishoy

"Charlie@CBFC" <ch*****@comcast.net> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi:

When I drop one user control on to the design surface of another user
control I can't seem to get a reference to it. Using the following in
host
control doesn't appear to work... protected MyUserControl MyUserControl1.
How do get ref so I can access it's properties?

Thanks,
Charlie

Nov 19 '05 #2
Charlie,

You can do this. If you look at the html view of your page I think you'll
find that the user control's name is concatenated together with the number
of the host control.

For example:

I created a new user control, webusercontrol1.ascx and then dropped onto it
another new control webusercontrol2.ascx. When viewing the html of
webusercontrol1 webusercontrol2 appears with the id of webusercontrol12.

Just take a look at your html view and make certain you're declaring the
control with the same name it has on the page.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Charlie@CBFC" <ch*****@comcast.net> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi:

When I drop one user control on to the design surface of another user
control I can't seem to get a reference to it. Using the following in
host
control doesn't appear to work... protected MyUserControl MyUserControl1.
How do get ref so I can access it's properties?

Thanks,
Charlie

Nov 19 '05 #3

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

Similar topics

0
by: Sunil Pereira | last post by:
Hi all, I have created an user control in windows form by making a new windows control library project in C#. I also have managed to show this user control in the html page. The user control...
10
by: Preston Crawford | last post by:
I'm looking to learn ASP.NET better and thinking about helping my church put together a website in order to do this. They need the help, I'd like the training, so I'm thinking of going this route...
7
by: Gene | last post by:
I have a number of aspx pages on which a single user control appears. All of the aspx pages and the user control make user of code-behind modules. I need for logic in the user control's code-behind...
3
by: Lloyd Sheen | last post by:
I have the following situation: Need a user resizable user control. After much trying with user control I came across the idea of hosting the controls in a form marked as not TopLevel = false. ...
2
by: scorpion53061 | last post by:
Hello All, Long time no see. I hope this finds you all well and having had a good holiday season. I am trying to figure out a way to control within a custom control the application that is...
2
by: dejavue82 | last post by:
Dear ASP.net programmers, I was wondering about the following: 1) Do hosts automatically support all of the .NET framework? (ex. System.Image) 2) If one rents a dedicated server, does one...
1
by: James | last post by:
CWinFormsDialog in .net 2.0 lets you host a .Net UserControl as a dialog in a managed C++ MDI application. I.e. in the sample: ----------------------------------------------- #include...
10
by: Benton | last post by:
Hi there, I have a UserControl with a couple of textboxes and a couple of buttons ("Save" and "Cancel"). The Click event for this buttons is in the UserControl's codebehind of course, so here's...
4
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried...
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:
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...
1
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
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.