Need the full URL of a Events item
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!
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.
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