Last post Nov 14, 2008 10:44 AM by ash_forumsasp
Nov 14, 2008 10:20 AM|pdassnyc|LINK
I'm planning to building a custom control, to be used with membership/roles, so on the page it will look something like this:
so that each section will be shown just to the roles assigned to the user. now the question is say i drop a dataGrid into one of them, how do i access it? I don't want to do it at the control level, as the control can be used elsewhere and not have a datagrid,
but some other control. can i just access to the dataGrid from the page_load of the .aspx page? Or do i need to get a reference to myControl and from there dig into the template and look for the control, or can i just use the FindControl method at the page
Just want to make sure there is someway to get it, before i start the control building work.
Nov 14, 2008 10:32 AM|Andreas Paulsson|LINK
Try the loginView control instead : http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.loginview.aspx .
Nov 14, 2008 10:44 AM|ash_forumsasp|LINK
You would have to dig down into your control for ex : MyControl.Admin to get the control dropped into it and then you can cast it to dataGrid or some other control that you would be knowing at .aspx page.