1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Need the full URL of a Events item

Need the full URL of a Events item

3 posts, 0 answered
  1. mario
    mario avatar
    23 posts
    Registered:
    08 Aug 2011
    13 Sep 2011
    Link to this post
    Hi,

    I made an user control that shows the Events. and i get the URL with this:

    <a href="<%# ((DateTime)DataBinder.Eval(Container.DataItem, "EventStart")).ToString("/yyyy'/'MM'/'dd/") %><%# DataBinder.Eval(Container.DataItem, "UrlName") %>">

    and throws an incomplete url... this is just the event page, i need the parent page name also.



    thanks in advance!
  2. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    15 Sep 2011
    Link to this post
    Hi Mario,

    Unfortunately there isn't a way. What you try to do is part of the logic that is implemented in the

    UrlResolver.Resolve() method, that cannot be carried to the template.

    Kind regards,
    Lubomir Velkov
    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
  3. mario
    mario avatar
    23 posts
    Registered:
    08 Aug 2011
    15 Sep 2011
    Link to this post
    Thanks for your answer Lubomir

    BTW I manage to solve this through

    <a href="
    <%# "/" + SitefinityWebApp.UserControls.Constants.projectName %>
    <%# DataBinder.Eval(Container.DataItem, "ApplicationName") %>
    <%# ((DateTime)DataBinder.Eval(Container.DataItem, "EventStart")).ToString("/yyyy'/'MM'/'dd/") %>
    <%# DataBinder.Eval(Container.DataItem, "UrlName") %>
    " >

    this way I can generate correct url to show the event :D
3 posts, 0 answered