I have a custom workflow in VS. I would like to merge an url. The problem is I am in an site collection with the name RFC. I see the absolute path 2 times when I merge like below:
ItemURL = currentItem.ParentList.DefaultDisplayFormUrl + "?ID=" + HttpUtility.UrlEncode(currentItem.ID.ToString());
string finalUrl = workflowProperties.WebUrl + ItemURL;
This results: http://mywebsite.nl/sites/RFC8/sites/RFC8/Lists/Wijzigingsverzoeken/DispForm.aspx?ID=1
The problem is, you see 2 times the absolute path : sites/RFC8
Here you can see what the merge is doing:
http://mywebsite.nl/sites/RFC8/ + sites/RFC8/Lists/Wijzigingsverzoeken/DispForm.aspx?ID=1
How can I get the website url without absolute path? Something like this: http://mywebsite.nl/