Okay, so I only just realised that this PageData.LinkURL actually outputs strings that look like this: /Views/Pages/BlogListingPageTemplate.aspx?id=303&epslanguage=en-GB
I'm presuming the output HTML response is then being rewritten before sending to the browser based on all the routing. (I'm using WebForms by the way, don't know if it is different for MVC).
What I've also noticed is that depending on where I am writing this to depends on whether it gets rewritten, so all seems okay if I write it to a <a href=""> but not so much if I just put it as text in a page for example.
Is there an easy way to get the final output URL as I'm executing my page or block code behind? And is there anything I might need to be aware of if appending query string parameters for in page functionality?
var url = UrlResolver.Current.GetUrl(currentPage.ContentLink);
Thanks! Until now I had realised there was a difference in output between the method, I shall now be more careful which I use in future.