Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • grazer 10 posts 31 karma points
    Apr 20, 2011 @ 12:10
    grazer
    0

    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? 

  • Pasang Tamang 252 posts 394 karma points
    Apr 20, 2011 @ 12:19
    Pasang Tamang
    0

    Hi

    You can get current node from querystring, Request.QueryString["id"].

    Pnima

  • grazer 10 posts 31 karma points
    Apr 20, 2011 @ 12:55
    grazer
    0

    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

     <nodeType alias="seasonEntry">
        <header>Season Entry</header>
        <usercontrol>/plugins/atomicf1/createSeasonEntry.ascx</usercontrol>
        <tasks>
          <create assembly="atomicf1" type="cms.presentation.seasonEntryTasks" />
          <delete assembly="atomicf1" type="cms.presentation.seasonEntryTasks" />
        </tasks>
      </nodeType>
  • grazer 10 posts 31 karma points
    Apr 20, 2011 @ 13:27
    grazer
    0

    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

    umbraco.helper.Request("nodeId");
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies