Home » MS OfficeRSS

How to use RichHtmlField in custom master page

Hi All,

I'm creating a new Custom Master Page with Footer and I have 5 subsites under my root site.

So I'm using Reusable Content to display in the footer.

 

Anyone tell me,

- Can I use <PublishingWebControls:RichHtmlField.....>  in my Custom Master Page..? or any webpage other than publishing Page.??

- If yes, How to display that resuable content in the footer of Master Page.?

 

Thanks.

 

7 Answers Found

 

Answer 1

Could you please check this link:=

http://msdn.microsoft.com/en-us/library/bb727372%28office.12%29.aspx

Hope this may help you

 

Answer 2

Hi Hemendra,

 

I tried that link, but I didn't understand "Using Custom Content Types and Publishing Fields" part of the explaination.

Do I need to create feature solution..?

I also dont have access to server, So, I can't upload any new feature to Server.

 

Thanks for your reply.

 

Answer 3

I dont think that You need to create feature for that. I have found a good link for you with video.

If you are able to open your site  in sharepoint designer then you can do it easily.

Let me know this link is helpful for you or not.

http://www.telerik.com/community/forums/aspnet/editor/error-while-using-radeditor-htmlfield-in-custom-aspx-page.aspx

You can also get more information of this control in below site

http://hacktics.nl/sp2k74d/source/final/bbl0077.html

 

 

Answer 4

Thanks for Reply Hemendra,

 

I tried Puting dll refernce to my custom  Mater page:

<%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation"
Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

and Placeholder for PageContent:

<PublishingWebControls:RichHtmlField
           FieldName="PublishingPageContent"
           runat="server" id="RichHtmlField1">
</PublishingWebControls:RichHtmlField>

It is working well and showing me reusable  content for my Welcome page. But, for other pages it is giving me ERROR:

"Form control does not have ControlMode set. "

Am I doin anything wrong.?

 

Thanks again.

 
 

Answer 6

Hi Seven,

 

I dont know what i'm doing wrong, Because its showing me Reusable content  on my custom Welcome page.

But, when I go to document library, calendar or default page  it is showing me "Form control does not have ControlMode set. " error.

 

I tried "ControlMode=Edit" Display and None. But, Still the same error.

 

Please let me know if you need my custom  Master  Page Code.

 

Thank you.

 

Answer 7

Oh...i have found some answer from internet. check them

1. Check if you are extending

LayoutsPageBase

insetad of System.Web.UI.Page On your codebehind

2.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:
Microsoft.SharePoint.SPException: Form control does not have ControlMode set.

Solution:

SPContext.GetContext(this.Context).FormContext.FormMode = SPControlMode.New;

SPControlMode is Enum with Dispaly, Edit, Invalid and New. Assign appropirate value to FormMode.

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter