More in this section

Forums / Developing with Sitefinity / Getting Blogs Content HyperLink id "fullContent1" URL

Getting Blogs Content HyperLink id "fullContent1" URL

1 posts, 0 answered
  1. humayoo
    humayoo avatar
    89 posts
    25 Oct 2010
    23 Nov 2011
    Link to this post

    i am making custom control to display the Latest Post with only Title. When User Clicked on Title, go to fullcontent item view page.

    my problem is that i am not able to get full url of fullcontent item view page.  UrlWithExtension gives me only publishdate/Title.aspx but full sitefinity path is not giving. how to get full path?

    if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
        IContent obj = e.Item.DataItem as IContent;
        if (obj != null)
            HyperLink PostTitle = (HyperLink)e.Item.FindControl("PostTitle");
            if (PostTitle != null)
                string _url=ResolveUrl("~")+(string)obj.UrlWithExtension;
                PostTitle.NavigateUrl = GetUrl(obj.ID.ToString(),obj.ProviderName.ToString());

1 posts, 0 answered