How can I get page current url using declarative syntax

Copper Contributor

Hi, 

 

I'm new to Sharepoint actually I'm front end developer, I'm trying to get the current URL of the page using declarative syntax, I used the following code:

<Sharepoint:ListItemProperty Property="FileRef" runat="server" />

It works but just if I have the page check out, as soon as I publish the page, it doesn't return nothing.

 

I want to know if there is a way to get the URL using a similar syntax.

1 Reply

Just in case someone has the same problem I solved with the following control:

 

<!--MS:<PageFieldFieldValue:FieldValue FieldName="105f76ce-724a-4bba-aece-f81f2fce58f5" runat="server">--><!--ME:</PageFieldFieldValue:FieldValue>-->