I have a contact email address in my page layout. I want to make that link clickable, but doesn't work in the href tag. What is the best way to get this to work in the page layout? Do I need to use jquery for this, we are trying to avoid that but if its my only option I guess Ill need to go that route.

1 Answer 1


if I'm not wrong you can try to use SPContext.Current.Item in the page layout like this

<a href='<%= SPContext.Current.Item["filedName"] ?? "/" %>'>Link</a>
  • I cant use code blocks in the page layout, thanks for the suggestion though
    – Cory
    Feb 25, 2013 at 19:36
  • Can you store your data as a string with tag "a" in you field and use this line of code <SharePoint:FieldValue id="someid" FieldName="FieldName" runat="server"/>?
    – Alexander
    Feb 25, 2013 at 19:49
  • nope tried that too, its looking like Ill need to use jquery
    – Cory
    Feb 25, 2013 at 20:02
  • have you tried to use Hyperlink field type to store data? and FieldValue control?
    – Alexander
    Feb 25, 2013 at 20:09
  • I found this post. In this post the link is built for Lookup field. I think that it should work for your field too.
    – Alexander
    Feb 25, 2013 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.