SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on a page layout, and this is what I have ...

<!-- Title -->
<SharePointWebControls:TextField FieldName="Title" runat="server" ID="Title" CssClass="emedia-spwc-global"></SharePointWebControls:TextField>

The field displays and edits no problem. But it is just a text field. How do I tell the control I want it to be displayed with in H1 tags with out wrapping the entire control in H1 tags.



share|improve this question
up vote 6 down vote accepted

Use an EditModePanel to display two different controls when editing and displaying:

<PublishingWebControls:EditModePanel runat=server PageDisplayMode="Edit">
    <SharePointWebControls:TextField FieldName="Title" CssClass="emedia-spwc-global" runat="server" />

<PublishingWebControls:EditModePanel runat=server PageDisplayMode="Display">
        <SharePointWebControls:FieldValue FieldName="Title" CssClass="emedia-spwc-global" runat="server" />
share|improve this answer
Wow again Whitelaw! That was perfect! Thanks ... again – mdumka Nov 10 '12 at 4:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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