I'm trying to render an element's mark-up using asp controls while avoiding using code-behind. So I want to dynamically generate the href property to include what is rendered from a FieldValue control (SharePointWebControls).
So for example this control I have:
<SharePointWebControls:FieldValue id="PageTitle" FieldName="Title" runat="server"/>
Appears as:
"TestPage"
And I have a link on that same page looking like this:
<a href="http://www.mysite.com/mypage.aspx?title=TestPage">CLICK HERE!</a>
But above in the <a>
element - I need TestPage to be there as a result of what's rendered by my FieldValue
control; so I basically need a way of 'embedding' the output of this control within the <a>
element's href property.
There's no messy bits of markup to accompany the rendered version of FieldValue
- it's literally just text - so I'm assuming this isn't complicated.