.NET control - passing values Options
leecrow
Posted: Monday, October 16, 2006 5:46:35 PM
Rank: Devotee

Joined: 10/14/2006
Posts: 33
Ok here are the facts :-)
- If I have public property PageID in my .NET control
- I created Macro that uses that control
- I created property of that macro with same name as public property (PageID)

So, no I have something like that in my template

<?UMBRACO_MACRO macroAlias="LeftNavigation" PageID="[PAGEID_HERE]" ></?UMBRACO_MACRO>

So now, I wonder how to pass current page to my .NET control's property?

hoehler
Posted: Monday, October 16, 2006 6:02:18 PM

Rank: Addict

Joined: 7/19/2006
Posts: 597
Location: Bad Homburg, Germany
I know that it is possible, but I can't find it. I think the solution was in the forum.

Another thing is, that you can get the actual node in your ascx via umbraco.presentation.nodeFactory.Node.GetCurrent as node object or via umbraco.library.GetXmlNodeCurrent() as XPathNodeIterator where you can get all infos via xslt or xml. I prefer the first possibility, cause it gives you intellisense and so on...

hth, Thomas

• 2007/2008 MVP • www.thoehler.com • Bad Homburg, Germany
leecrow
Posted: Monday, October 16, 2006 8:31:22 PM
Rank: Devotee

Joined: 10/14/2006
Posts: 33
Thanks
I would also try to find this solution on forum since I must give option to client to change somethings, and doubt he can change things in ASCX :-)

Thanks
hoehler
Posted: Monday, October 16, 2006 8:42:22 PM

Rank: Addict

Joined: 7/19/2006
Posts: 597
Location: Bad Homburg, Germany
Found one: http://forum.umbraco.org/xslt/pass-pageid-to-macro/re-pass-pageid-to-macro

Cheers, Thomas

• 2007/2008 MVP • www.thoehler.com • Bad Homburg, Germany
leecrow
Posted: Monday, October 16, 2006 9:31:59 PM
Rank: Devotee

Joined: 10/14/2006
Posts: 33
Mate, you continue with saving my life :-)
Thanks again.

Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.