SharePoint 2013: Obtenez URL des discussions dans la liste des discussions
-
09-12-2019 - |
Question
Je travaille sur SharePoint 2013 Site communautaire, je développe une webpart personnalisée où je filtre les discussions et affichant le titre des discussions en tant que lien hypertexte. Comment trouver l'URL des discussions pour la définir sur des hyperliens déployés dans le WebPart personnalisé
La solution
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
Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange