Nested usercontrols - system.page not reachable?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Turn on Trace ... inspect Trace.axd for particular request of page and see
whole tree of controls on your page. You will get answer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top