SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im working on Sharepoint 2013 Community site, Im developing a custom webpart where I filter the discussions and displaying the title of the discussions as a Hyperlink. How can I find the url of the discussions to set it to hyperlinks that are displyed in the custom webpart

share|improve this question
up vote 0 down vote accepted

Hi I found out the answer for this question. All the urls of the discussions are stored in the discussions list but we can access only through the code we cannot display that column in any views. I'll share my code below

foreach (SPListItem post in oSpListItemClnPost)
    String postUrl = post["URL Path"].ToString();

    String url = oSpSite.Url;
    url += "/SitePages/Topic.aspx?RootFolder=" + postUrl;

So string url will be the final url of the discussions in the discussions list.

Thank You

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.