R M
R M

Reputation: 119

.NET Ajax toolkit HtmlEditorExtender not showing bottom toolbar

I am having a slight issue with the Microsoft .Net Ajax toolkit HtmlEditorExtender control. The issue that I am having is that the bottom toolbar (the one where you can go in to html view mode) does not show, only the top toolbar above the text box. This is the .net 3.5 version. The question is how do I display the bottom toolbar or what I am doing wrong. See code below.

    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

<asp:TextBox ID="txbMessage" runat="server" Width="95%" 
                                    TextMode="MultiLine" Height="156px"></asp:TextBox>
                                    <ajax:HtmlEditorExtender 
                                        ID="htmlEditorExtender1" 
                                        TargetControlID="txbMessage"                                          
                                        runat="server" >
                                        <Toolbar> 
                                                <ajax:Undo />
                                                <ajax:Redo />
                                                <ajax:Bold />
                                                <ajax:Italic />
                                                <ajax:Underline />
                                                <ajax:StrikeThrough />
                                                <ajax:Subscript />
                                                <ajax:Superscript />
                                                <ajax:JustifyLeft />
                                                <ajax:JustifyCenter />
                                                <ajax:JustifyRight />
                                                <ajax:JustifyFull />
                                                <ajax:InsertOrderedList />
                                                <ajax:InsertUnorderedList />
                                                <ajax:CreateLink />
                                                <ajax:UnLink />
                                                <ajax:RemoveFormat />
                                                <ajax:SelectAll />
                                                <ajax:UnSelect />
                                                <ajax:Delete />
                                                <ajax:Cut />
                                                <ajax:Copy />
                                                <ajax:Paste />
                                                <ajax:BackgroundColorSelector />
                                                <ajax:ForeColorSelector />
                                                <ajax:FontNameSelector />
                                                <ajax:FontSizeSelector />
                                                <ajax:Indent />
                                                <ajax:Outdent />
                                                <ajax:InsertHorizontalRule />
                                                <ajax:HorizontalSeparator />                                                
                                                <%--<ajax:InsertImage />--%>
                                            </Toolbar>            
                                    </ajax:HtmlEditorExtender>


<ajax:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></ajax:ToolkitScriptManager>

Upvotes: 1

Views: 5355

Answers (1)

Storm
Storm

Reputation: 682

The Ajax Control Toolkit example site, gives you an example on how to show the bottom toolbar. The HTMLEditorExtender has a public property named DisplaySourceTab. Default the value is false, change it to true.

Like this:

<ajax:HtmlEditorExtender runat="server" ID="htmlEditorExtender1" TargetControlID="txbMessage" DisplaySourceTab="True">

I used the MAY 2012 release of the AJAX Control Toolkit 3.5 and unfortunately, my HTMLEditorExtender did not have a 'DisplaySourceTab' property. So I had to download the latest AJAX Control toolkit release (JUNE 2012) here: http://ajaxcontroltoolkit.codeplex.com/releases/view/90063

When you receive the error 'DisplaySourceTab' is not a public property of the AjaxControlToolkit.HtmlExtender (or something similar), rebuild the project. Then it should work.

Upvotes: 2

Related Questions