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

Nested usercontrols - system.page not reachable?

Sue
Web app: asp.net 2003, IE, IIS, VB
top: system.page
-first level: placeholder
--second level: usercontrol
---third level: user control containing a datagrid

Datagrid itemdatabound assigns:
Dim button As LinkButton = CType(e.Item.Cells(0).Controls(0), LinkButton)
e.Item.Cells(1).Attributes("onclick") =
Page.GetPostBackClientHyperlink(button, "")

When debugging "Page" is nothing. "Me.Page" is nothing. Traced "e's" parents
back to the datagrid object at which point the datagrid's parent is nothing.

If I place the usercontrol containing the datagrid in a placeholder and the
placeholder on web page, this works just fine.

Just out of curiosity, why does the datagrid not see it's parent usercontrol
when the parent usercontrol is a control of another usercontrol?

Hope this makes sense....

tia,
Sue
May 19 '06 #1
1 1186
Turn on Trace ... inspect Trace.axd for particular request of page and see
whole tree of controls on your page. You will get answer.

"Sue" wrote:
Web app: asp.net 2003, IE, IIS, VB
top: system.page
-first level: placeholder
--second level: usercontrol
---third level: user control containing a datagrid

Datagrid itemdatabound assigns:
Dim button As LinkButton = CType(e.Item.Cells(0).Controls(0), LinkButton)
e.Item.Cells(1).Attributes("onclick") =
Page.GetPostBackClientHyperlink(button, "")

When debugging "Page" is nothing. "Me.Page" is nothing. Traced "e's" parents
back to the datagrid object at which point the datagrid's parent is nothing.

If I place the usercontrol containing the datagrid in a placeholder and the
placeholder on web page, this works just fine.

Just out of curiosity, why does the datagrid not see it's parent usercontrol
when the parent usercontrol is a control of another usercontrol?

Hope this makes sense....

tia,
Sue

May 21 '06 #2

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

Similar topics

2
by: Marek | last post by:
Hi, I have a Form with many UserControls on it. Some of the UserControls contain other Controls. What is the best way of notifying each of the nested controls about an event that has occured on...
0
by: Ed Allan | last post by:
http://ejaconsulting.com/nestedrepeater/NestedRepeater.txt >-----Original Message----- >Doh! The HTML has all been rendered . . . > >Right click on this link and select 'Save target as ..' >to...
2
by: N. Demos | last post by:
I have a user control with code behind of which two instances are created/declared in my aspx page. The aspx page has code behind also, as I need to access methods of the usercontrols on page...
0
by: ujjc001 | last post by:
Here's the layout. Aspx has a repeater on the left, which will call a function to change a session var that holds the usercontrol name to add (i.e. "uc_myusercontrol.ascx") and then calls...
5
by: David Lozzi | last post by:
Hello, I have an interesting issue, so bear with me as I try to explain. I have a datalist posing as tabs for my application. And as each tab is clicked, a placeholder is then populated with the...
3
by: Nathan Sokalski | last post by:
I have my UserControls in a subdirectory called usercontrols. In the code for one of my UserControls I have the following: Public Property adimage() As String Get Return...
1
by: Carlo Razzeto | last post by:
Hey, I've got a couple of production UserControls going in my companies web system, but I'm having a couple of annoying issues with them. One of them, for instance is a ScannerButton control which...
2
by: brad | last post by:
Group, I'm using Visual Studio 2003 to create an ASP.NET 1.1 project which contains nested server user controls in order to create a tree-like hierarchy. The tree is a sort of question and...
7
by: Nathan Sokalski | last post by:
I have a page which I dynamically add several usercontrols (*.ascx files) to using the following code: Public Sub Refresh() For Each section As DataRow In Me.GetSections().Rows...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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
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.