I have a custom create control that is hooked up correctly so that when I select Create from the context menu, my control is displayed instead of standard. The control correctly inserts records into the database (custom table) if I dummy up on of the fields.
I am adding entrants to a race, under the race node but I need to know which race I'm adding them to. Is there a way, from the code behind of the create ascx to get the node that I clicked on and selected Create. If I can get the node programmatically, I can obtain the Id I need (as it's assigned to the NodeKey field). I use similar logic to create the tree.
Thanks for the response, but unfortunately it is not working for me. Request.QueryString["id"] is null. Request.QueryString["id"] is populated in my ASPX though. The difference being this is a custom create ascx as configured in my create/UI.xml below
Custom Create Control
I have a custom create control that is hooked up correctly so that when I select Create from the context menu, my control is displayed instead of standard. The control correctly inserts records into the database (custom table) if I dummy up on of the fields.
I am adding entrants to a race, under the race node but I need to know which race I'm adding them to. Is there a way, from the code behind of the create ascx to get the node that I clicked on and selected Create. If I can get the node programmatically, I can obtain the Id I need (as it's assigned to the NodeKey field). I use similar logic to create the tree.
Is this possible and if so how?
Hi
You can get current node from querystring, Request.QueryString["id"].
Pnima
Thanks for the response, but unfortunately it is not working for me. Request.QueryString["id"] is null. Request.QueryString["id"] is populated in my ASPX though. The difference being this is a custom create ascx as configured in my create/UI.xml below
Ok so I downloaded the source for 4.7.1 and opened the simple.ascx page to see what I could see. and found the following which does what I need
is working on a reply...