Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# travislaborde 3/3/2008 8:55 PM
I'm creating custom modules, and learning my way around the object model, but I've hit a couple of snags.

In the code-behind of my ASCX controls I have access to:

MyBase.PageEngine.CuyahogaUser.UserName

But I can't find the equivalent in my codebehind for the supporting ASPX ( "Edit" ) page.


The opposite holds true, where in the ASPX code-behind I have access to:

Me.Section.Id

Which I can't find the equivalent of in the ASCX code-behind!


Can anyone help me here? Ideally I need both pieces of information, no matter if I'm in the ASCX or ASPX code...

Thanks!
Travis
# martijnb 3/4/2008 9:08 AM
travislabordeIn the code-behind of my ASCX controls I have access to:

MyBase.PageEngine.CuyahogaUser.UserName

But I can't find the equivalent in my codebehind for the supporting ASPX ( "Edit" ) page.

It's always possible to get the current user via the User property of the aspx page (IPrincipal) and cast that to a Cuyahoga user.
Me.Section.Id

Which I can't find the equivalent of in the ASCX code-behind!

via the Module property: this.Module.Section.Id
# travislaborde 3/4/2008 2:21 PM
Just what I needed, thanks!

Travis