I have a user control page named MyUC.ascx which has a Panel control
This Panel, in turn, has a TextBox. Next I use this user control in an
ASPX page named MyPage.aspx by registering the user control using the
following Register directive in the ASPX page
<%@ Register TagPefix="UC" TagName="UControl" Src="MyUC.ascx" %>
<form runat="server">
<UC:UControl ID="uc1" runat="server"/>
</form>
Now if I am not mistaken, the hierarchy of the controls in the ASPX
page would be
Page
Form
User Control
Panel
TextBox
As per the above hierarchy diagram, the TextBox is a member of the
Panel's Controls Collection but isn't the TextBox also a member of the
Page's Controls Collection here? 5 1405
nope :)
The Controls collection only contains the children controls, not the
children of the children (and so on). rn**@rediffmail.com wrote:
I have a user control page named MyUC.ascx which has a Panel control
This Panel, in turn, has a TextBox. Next I use this user control in an
ASPX page named MyPage.aspx by registering the user control using the
following Register directive in the ASPX page
<%@ Register TagPefix="UC" TagName="UControl" Src="MyUC.ascx" %>
<form runat="server">
<UC:UControl ID="uc1" runat="server"/>
</form>
Now if I am not mistaken, the hierarchy of the controls in the ASPX
page would be
Page
Form
User Control
Panel
TextBox
As per the above hierarchy diagram, the TextBox is a member of the
Panel's Controls Collection but isn't the TextBox also a member of the
Page's Controls Collection here?
Velislav, that means that even the Panel control is not a member of the
Page's Control Collection but the user control is a member of the
Page's Controls Collection, isn't it? Please correct me if I am wrong.
Thanks for the prompt response.
Velislav wrote:
nope :)
The Controls collection only contains the children controls, not the
children of the children (and so on).
rn**@rediffmail.com wrote:
I have a user control page named MyUC.ascx which has a Panel control
This Panel, in turn, has a TextBox. Next I use this user control in an
ASPX page named MyPage.aspx by registering the user control using the
following Register directive in the ASPX page
<%@ Register TagPefix="UC" TagName="UControl" Src="MyUC.ascx" %>
<form runat="server">
<UC:UControl ID="uc1" runat="server"/>
</form>
Now if I am not mistaken, the hierarchy of the controls in the ASPX
page would be
Page
Form
User Control
Panel
TextBox
As per the above hierarchy diagram, the TextBox is a member of the
Panel's Controls Collection but isn't the TextBox also a member of the
Page's Controls Collection here?
<rn**@rediffmail.comwrote in message
news:11**********************@h54g2000cwb.googlegr oups.com...
As per the above hierarchy diagram, the TextBox is a member of the
Panel's Controls Collection but isn't the TextBox also a member of the
Page's Controls Collection here?
No.
That is correct, the Panel is part of the User Control's Controls, but
not the Page's Controls.
To get to the Panel from the Page, you'd have to do something like
Page.Controls[userControlIndex].Controls[panelControlIndex] rn**@rediffmail.com wrote:
Velislav, that means that even the Panel control is not a member of the
Page's Control Collection but the user control is a member of the
Page's Controls Collection, isn't it? Please correct me if I am wrong.
Thanks for the prompt response.
Velislav wrote:
nope :)
The Controls collection only contains the children controls, not the
children of the children (and so on). rn**@rediffmail.com wrote:
I have a user control page named MyUC.ascx which has a Panel control
This Panel, in turn, has a TextBox. Next I use this user control in an
ASPX page named MyPage.aspx by registering the user control using the
following Register directive in the ASPX page
>
<%@ Register TagPefix="UC" TagName="UControl" Src="MyUC.ascx" %>
>
<form runat="server">
<UC:UControl ID="uc1" runat="server"/>
</form>
>
Now if I am not mistaken, the hierarchy of the controls in the ASPX
page would be
>
Page
Form
User Control
Panel
TextBox
>
As per the above hierarchy diagram, the TextBox is a member of the
Panel's Controls Collection but isn't the TextBox also a member of the
Page's Controls Collection here?
The defining element here is the concept of Controls that are part of the
Page's Control tree, but which controls have their own child control
hierarchy.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"rn**@rediffmail.com" wrote:
I have a user control page named MyUC.ascx which has a Panel control
This Panel, in turn, has a TextBox. Next I use this user control in an
ASPX page named MyPage.aspx by registering the user control using the
following Register directive in the ASPX page
<%@ Register TagPefix="UC" TagName="UControl" Src="MyUC.ascx" %>
<form runat="server">
<UC:UControl ID="uc1" runat="server"/>
</form>
Now if I am not mistaken, the hierarchy of the controls in the ASPX
page would be
Page
Form
User Control
Panel
TextBox
As per the above hierarchy diagram, the TextBox is a member of the
Panel's Controls Collection but isn't the TextBox also a member of the
Page's Controls Collection here?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Gary \(Girish\) |
last post by:
Hello:
I am using SA-FileUp to enable members to upload their product
images
to my ISP sever. When member uploaded a new image file, the file name is
replaced with the member ID and the old file...
|
by: omyek |
last post by:
I'm trying to mimic the browsing of a webpage using an HttpWebRequest.
I've had a lot of luck with it so far, including logging into pages,
posting form data, and even collecting and using cookies....
|
by: JohnSmith |
last post by:
I suspect this is easy, but I have been stumped for a day trying to solve this..
I want to be able to have an unlimited number of aspx pages that all use the code in one class file. I want code...
|
by: N. Demos |
last post by:
Hello,
I have a custom usercontrol, of which I have two instances of in my aspx
page. Both the usercontrol and page have codebehind. In the page
codebehind, I want a member variable for each...
|
by: kang jia |
last post by:
hi
when user entered particulars in signuppage and click" signup" button, i will direct them to do_signup.php. if say the NRIC is dupicate in datebase, i will redirect them back to signup page...
|
by: Goran Djuranovic |
last post by:
Hi all,
I am experiencing a strange thing happening with a "designer.vb" page. Controls I manually declare in this page are automatically deleted after I drop another control on a ".aspx" page.
-...
|
by: premprakashbhati |
last post by:
hi, good evening..
i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button()
here is the code ...its work fine...
|
by: mideastgirl |
last post by:
YIKES! I am having problems going from mideasthonors.org/addmember.php to either the error page because the form has not been filled out accurately, or to the thank you page!!!! Here is my script,...
|
by: adweaver |
last post by:
Hello All,
I'm new to the world of php. I've just had a site designed for me by a company, and I'm now trying to manage and grow it, so it will suit my needs.
The site was built in a folder...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
|
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: 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,...
|
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...
| |