More in this section

Forums / Bugs & Issues / How to Get GUID of Current Page's Object for use in User Control

How to Get GUID of Current Page's Object for use in User Control

2 posts, 0 answered
  1. Andrew
    Andrew avatar
    6 posts
    Registered:
    16 Mar 2012
    03 Aug 2012
    Link to this post
    I have created a custom module named "Courses".  I have some pages (View, Edit, etc.) that will have functionality contained within User Controls.  I tried the following structure, but it did not work because I have not been able to get ViewState enabled within the User Controls in order to retain values upon Postback.
    Edit Course
      Courses Widget (Single Item)
         Widget Template  (Course - Single)
             Declaration of User Control

    Therefore, I am resorting to the following structure:
    Edit Course
        Custom Widget (pointing to desired user control)

    This approach does seem to retain values upon Postback with ViewState enabled.  However, I cannot seem to find a way to programmatically get the GUID of the current record  using this approach.  In other words, I need my User Control to some how be able to get the GUID associated with the course for the URL of the Edit Page (http://site/course/edit/test-course-5).

    Any help would be appreciated.  Please let me know if there is any additional information or explanation needed.
  2. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    08 Aug 2012
    Link to this post
    Hi Andrew,

    I have responded in your support thread. 

    Regards,
    Jen Peleva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered