Friday, June 25, 2010

Adding a custom control to the SharePoint 2010 Team Site Wiki Page Template ( wkpstd.aspx ) programmatically

style="PADDING-BOTTOM: 10px; MARGIN: 1px 0px; PADDING-LEFT: 13px; PADDING-RIGHT: 0px; COLOR: #e9ab17; FONT-WEIGHT: bold; PADDING-TOP: 10px">Topic


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">This
is maybe my last post about the Team Site Wiki Page customization with
the aim of exceeding its limitations. This time we are going to customize the
unique template ( wkpstd.aspx) by replacing the control that renders the
editable content by a custom one.
In this post example, we will take
advantage of the use of this custom control to render not editable additional
contents, for instance, a header and a footer that could be the same for a
specific Wiki Page Library. Of course, we are not going to really customize the template, but we are going to use a delegate control to replace the control at runtime.


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">Here are
the screen shots of the result:


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">We
can see a non editable Header and Footer on the Team Site Wiki Page


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">





style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">In
edit mode these additional contents are not rendered, but we can add new content
as usual


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">






style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">And
of course, after having saved the page, the new content is rendered wtih the non
editable Header and Footer.


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">





style="PADDING-BOTTOM: 10px; MARGIN: 1px 0px; PADDING-LEFT: 13px; PADDING-RIGHT: 0px; COLOR: #e9ab17; FONT-WEIGHT: bold; PADDING-TOP: 10px">Steps
required  


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">If
you look at the Team Site Wiki Page template, wkpstd.aspx, you can see the
control that is rendering the editable content/

face="Courier New">

color=#0000ff face="Courier New">face="Courier New"><face="Courier New">face="Courier New">SharePointface="Courier New">face="Courier New">:face="Courier New">face="Courier New">EmbeddedFormFieldface="Courier New"> face="Courier New">face="Courier New">IDface="Courier New">face="Courier New">="WikiField"face="Courier New"> face="Courier New">face="Courier New">FieldNameface="Courier New">face="Courier New">="WikiField"face="Courier New"> face="Courier New">face="Courier New">ControlModeface="Courier New">face="Courier New">="Display"face="Courier New"> color=#ff0000 face="Courier New">face="Courier New">runatface="Courier New">face="Courier New">="server"face="Courier New"> face="Courier New">color=#0000ff size=1 face="Courier New">/>


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">We
are first going to create a custom EmbeddedFormField control


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">Then,
we are going to use a delegate control to replace the native EmbeddedFormField
control by the custom one in order to have the control on the wiki page
content rendering.


style="PADDING-BOTTOM: 10px; MARGIN: 1px 0px; PADDING-LEFT: 13px; PADDING-RIGHT: 0px; COLOR: #e9ab17; FONT-WEIGHT: bold; PADDING-TOP: 10px">1
- Creating a custom EmbeddedFormField control


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">Here
is the screen shot of the Visual Studio solution:


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">





style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">and
the custom control source code:


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">

class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>using
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> System;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>using
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> System.Collections.Generic;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>using
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> System.ComponentModel;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>using
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> System.Linq;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt">usingstyle="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
System.Text;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>using
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> System.Web;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>using
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> System.Web.UI;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>using
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> System.Web.UI.WebControls;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>using
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> Microsoft.SharePoint;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>using
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> Microsoft.SharePoint.WebControls;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt">usingstyle="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
Microsoft.SharePoint.Security;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>using
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> System.Security.Permissions;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>using
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> System.Diagnostics;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>namespace
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> CustomControls


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>    [style="COLOR: #2b91af">SharePointPermission(style="COLOR: #2b91af">SecurityAction.LinkDemand, ObjectModel = style="COLOR: blue">true), style="COLOR: #2b91af">AspNetHostingPermission(style="COLOR: #2b91af">SecurityAction.LinkDemand, Level = style="COLOR: #2b91af">AspNetHostingPermissionLevel.Minimal), style="COLOR: #2b91af">SharePointPermission(style="COLOR: #2b91af">SecurityAction.InheritanceDemand, ObjectModel =
true), style="COLOR: #2b91af">AspNetHostingPermission(style="COLOR: #2b91af">SecurityAction.InheritanceDemand, Level = style="COLOR: #2b91af">AspNetHostingPermissionLevel.Minimal)]


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>    style="COLOR: blue">public class style="COLOR: #2b91af">EmbeddedFormFieldCustom : style="COLOR: #2b91af">FormField


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>   
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
public
EmbeddedFormFieldCustom()


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
Debug.WriteLine(style="COLOR: #a31515">"EmbeddedFormFieldCustom: " + style="COLOR: #a31515">"constructor...");


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
private style="COLOR: blue">string _header = style="COLOR: #a31515">"";


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt">privatestyle="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt"> style="COLOR: blue">string _footer = style="COLOR: #a31515">"";


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt"> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
public style="COLOR: blue">string Footer


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
get { style="COLOR: blue">return _footer; }


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
set { _footer = style="COLOR: blue">value; }


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
public style="COLOR: blue">string Header


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
get { style="COLOR: blue">return _header; }


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
set { _header = style="COLOR: blue">value; }


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
[PersistenceMode(style="COLOR: #2b91af">PersistenceMode.InnerDefaultProperty)]


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
public style="COLOR: blue">string Content


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
get


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
SPFieldMultiLineText field = style="COLOR: blue">base.Field as style="COLOR: #2b91af">SPFieldMultiLineText;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
if (field != style="COLOR: blue">null)


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">            
style="mso-spacerun: yes">       style="COLOR: #2b91af">Debug.WriteLine(style="COLOR: #a31515">"EmbeddedFormFieldCustom: " + style="COLOR: #a31515">"SPFieldMultiLineText ok");


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
return field.GetFieldValueAsHtml(style="COLOR: blue">this.ItemFieldValue, style="COLOR: blue">base.ListItem);


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
Debug.WriteLine(style="COLOR: #a31515">"EmbeddedFormFieldCustom: " + style="COLOR: #a31515">"SPFieldMultiLineText non
ok"
);


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
return style="COLOR: blue">base.Field.GetFieldValueAsHtml(style="COLOR: blue">this.ItemFieldValue);


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
set


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
Debug.WriteLine(style="COLOR: #a31515">"EmbeddedFormFieldCustom: " + style="COLOR: #a31515">"set Content");


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
this.ItemFieldValue = style="COLOR: blue">value;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
[SharePointPermission(style="COLOR: #2b91af">SecurityAction.Demand, ObjectModel = style="COLOR: blue">true)]


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
protected style="COLOR: blue">override void
Render(HtmlTextWriter
output)


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
Debug.WriteLine(style="COLOR: #a31515">"EmbeddedFormFieldCustom: " + style="COLOR: #a31515">"rendering..");


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
output.AddAttribute(style="COLOR: #2b91af">HtmlTextWriterAttribute.Id, style="COLOR: blue">this.ClientID);


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
output.Write(_header);


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
output.RenderBeginTag(style="COLOR: #2b91af">HtmlTextWriterTag.Div);


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
style="COLOR: blue">base.Render(output);


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
output.Write(_footer);


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>    style="mso-spacerun: yes">        
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">output.RenderEndTag();


class=MsoNormal>style="mso-spacerun: yes">       
}


class=MsoNormal>style="mso-spacerun: yes">    }


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt"> 


style="LINE-HEIGHT: 115%; FONT-SIZE: 9pt">face=Calibri> 



style="PADDING-BOTTOM: 10px; MARGIN: 1px 0px; PADDING-LEFT: 13px; PADDING-RIGHT: 0px; COLOR: #e9ab17; FONT-WEIGHT: bold; PADDING-TOP: 10px">2 -
Replacing the standard control by the custom one by using a delegate control


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px"> Here
is the delegate control source code:


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">

class=MsoNormal>style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; FONT-SIZE: 9pt; mso-ansi-language: EN-US; mso-highlight: yellow"
lang=EN-US><%
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>@
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> Control style="COLOR: red">Language="C#" style="COLOR: red">ClassNamestyle="COLOR: blue">="WikiPageCustomLink" style="BACKGROUND: yellow; mso-highlight: yellow">%>


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; FONT-SIZE: 9pt; mso-ansi-language: EN-US; mso-highlight: yellow"
lang=EN-US><%
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>@
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> Register style="COLOR: red">TagPrefixstyle="COLOR: blue">="SharePoint" style="COLOR: red">Namespacestyle="COLOR: blue">="Microsoft.SharePoint.WebControls"


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>    style="COLOR: red">Assemblystyle="COLOR: blue">="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c"
style="BACKGROUND: yellow; mso-highlight: yellow">%>


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; FONT-SIZE: 9pt; mso-ansi-language: EN-US; mso-highlight: yellow"
lang=EN-US><%
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>@
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> Assembly style="COLOR: red">Name="CustomControls,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=0f4e5a441a5ac20c"
style="BACKGROUND: yellow; mso-highlight: yellow">%>


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; FONT-SIZE: 9pt; mso-ansi-language: EN-US; mso-highlight: yellow"
lang=EN-US><%
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>@
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> Import style="COLOR: red">Namespacestyle="COLOR: blue">="Microsoft.SharePoint" style="BACKGROUND: yellow; mso-highlight: yellow">%>


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; BACKGROUND: yellow; FONT-SIZE: 9pt; mso-ansi-language: EN-US; mso-highlight: yellow"
lang=EN-US><%
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>@
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> Import style="COLOR: red">Namespacestyle="COLOR: blue">="System.Diagnostics" style="BACKGROUND: yellow; mso-highlight: yellow">%>


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>    style="COLOR: darkgreen"><!--delegate control begin
-->


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US><
style="FONT-FAMILY: 'Courier New'; COLOR: maroon; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>script
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> runatstyle="COLOR: blue">="server">style="mso-spacerun: yes">   


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>    style="COLOR: #2b91af">Control ctrlTofind = style="COLOR: blue">null;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>   
CustomControls.EmbeddedFormFieldCustom myCustomEmbeddedFormField = style="COLOR: blue">null;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>    style="COLOR: blue">protected void
FindControl(Control aControl, style="COLOR: blue">string ID)


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>   
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
if
(aControl.HasControls())


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
foreach (style="COLOR: #2b91af">Control aControl2 style="COLOR: blue">in aControl.Controls)


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
if (aControl2.ID ==
ID)


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
ctrlTofind = aControl2;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>     style="mso-spacerun: yes">           }


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
else


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
FindControl(aControl2, ID);


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
else


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
if (aControl.ID ==
ID)


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
ctrlTofind = aControl;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>   style="mso-spacerun: yes">         }


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>   
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>    style="COLOR: blue">protected override
void OnInit(style="COLOR: #2b91af">EventArgs e)


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>   
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
if (!IsPostBack)


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
Debug.WriteLine(style="COLOR: #a31515">"onInit");


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
if
(Page.TemplateControl.ToString().Contains(style="COLOR: #a31515">"ASP.WKPSTD_ASPX"))


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">{


class=MsoNormal>style="mso-spacerun: yes">               
try


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
int ctrlNumber = style="COLOR: blue">this.Page.Controls.Count;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
foreach (style="COLOR: #2b91af">Control aControl style="COLOR: blue">in style="COLOR: blue">this.Page.Controls)


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                       
FindControl(aControl, style="COLOR: #a31515">"WikiField");


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>    style="mso-spacerun: yes">                }


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
myCustomEmbeddedFormField = new
CustomControls.EmbeddedFormFieldCustom();


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
myCustomEmbeddedFormField.Header = "<span
style='color:red;font-size:12pt' >This is my Custom header, not
editable</span>"
;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
myCustomEmbeddedFormField.Footer = "<span
style='color:red;font-size:12pt' >This is my Custom footer, not
editable</span>"
;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
Control
updatePannelContentTemplateContainer = ctrlTofind.Parent;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
UpdatePanel myUpdatepannel = (style="COLOR: #2b91af">UpdatePanel)updatePannelContentTemplateContainer.Parent;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
int index = style="COLOR: brown">0;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
for (style="COLOR: blue">int i = 0; i <
updatePannelContentTemplateContainer.Controls.Count; i++)


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                       
if
(updatePannelContentTemplateContainer.Controls[i].ID == style="COLOR: #a31515">"WikiField")


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                       
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                           
index = i;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                       
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
updatePannelContentTemplateContainer.Controls.Remove(ctrlTofind);


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
updatePannelContentTemplateContainer.Controls.AddAt(index,
myCustomEmbeddedFormField);


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
myCustomEmbeddedFormField.FieldName = style="COLOR: #a31515">"WikiField";


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
myCustomEmbeddedFormField.ID = style="COLOR: #a31515">"WikiField";


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
myCustomEmbeddedFormField.ControlMode =
Microsoft.SharePoint.WebControls.style="COLOR: #2b91af">SPControlMode.Display;


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
catch (style="COLOR: #2b91af">Exception ex)


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">               
{


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
Response.Write("<br>error :
<br>"
+ ex.Message);


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">                   
Response.Write("<br>error :
<br>"
+ ex.StackTrace);


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
style="mso-spacerun: yes">    }


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">           
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>style="mso-spacerun: yes">       
base.OnInit(e);


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>   
}


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US></
style="FONT-FAMILY: 'Courier New'; COLOR: maroon; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>script
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>>
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>


class=MsoNormal>style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US>    style="COLOR: darkgreen"><!--delegate control end
-->


style="LINE-HEIGHT: 115%; FONT-SIZE: 9pt; mso-ansi-language: EN-US"
lang=EN-US> 



style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px"> The
secret is to load the custom control only if it is not a post back, since the
embedded control itself seems to be used only for displaying the content.


style="PADDING-BOTTOM: 10px; MARGIN: 1px 0px; PADDING-LEFT: 13px; PADDING-RIGHT: 0px; COLOR: #e9ab17; FONT-WEIGHT: bold; PADDING-TOP: 10px"> Conclusion


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">Of
course this trick could be used to add an additional custom control, a web part
zone, etc... to no more be limited by the unique wkpstd.aspx template features.
I let you explore the possibilities...


style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">This
is maybe my last post on the Team Site Wiki Page customization.


    style="MARGIN-TOP: 5px; FONT-FAMILY: arial; MARGIN-BOTTOM: 5px; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal">
  1. We have already explored the customizations linked to the CSS, and
    the way to add a delegate control in these posts:

    href="http://mosshowto.blogspot.com/2009/12/sharepoint-2010-wiki-styles.html">Managing
    the Styles and the Markup Styles Menus for the Wiki Pages of a SharePoint 2010
    Team Site

    href="http://mosshowto.blogspot.com/2010/06/sharepoint-2010-registering-css.html">Themable
    CSS Registration and Rendering for SharePoint 2010



  2. We have explained how to provision custom content in a Wiki Page in this
    one:

    href="http://mosshowto.blogspot.com/2010/06/sharepoint-2010-wiki-provisioning.html"> color=#996699>Provisioning a custom Wiki Page within a SharePoint 2010 Team
    Site



  3. And this is the general post on the SharePoint 2010 Team Site Wiki Pages
    Branding and Customizations that also shows how to debug the Ribbon

    href="http://mosshowto.blogspot.com/2010/06/sharepoint-2010-wiki-customizing.html"> color=#996699>Customizing and branding the SharePoint 2010 wiki
    pages



style="TEXT-ALIGN: justify; PADDING-BOTTOM: 18px; MARGIN: 1px 0px; PADDING-LEFT: 18px; PADDING-RIGHT: 5px; FONT-FAMILY: arial; COLOR: gray; FONT-SIZE: 10pt; FONT-WEIGHT: normal; PADDING-TOP: 5px">I
think I can now keep exploring the SharePoint 2010 wiki cuztomizations, but in
the SharePoint 2010 Server version and try to use a custom
SPFieldMultiLineText.

No comments:

Post a Comment