Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 21st, 2010, 09:23 AM
Friend of Wrox
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile FCKeditor and data bound control

Hello everyone,
I am using FCKeditor, which is demonstrated in CMS. The control is working as intended in CMS application but when I am using the same Control in other application then it fails. I think this is because of Details view (data bound control). Is not fckeditor supportable with data bound controls? If I am right then is there any other method to resolve it? Or if I wrong then can anybody tell me what is wrong with the code that I am using?

Code:
<asp:DetailsView ID="DetailsView1" runat="server" 
            AutoGenerateRows="False" CellPadding="4" DataKeyNames="Id" 
            DataSourceID="News" DefaultMode="Insert" >
            <Fields>
                <asp:TemplateField HeaderText="Subject" SortExpression="Subject">
                    <EditItemTemplate>
                      
                        <FCKeditorV2:FCKeditor ID="txtSubject" runat="server" BasePath="../FCKeditor/" ToolbarSet="Basic" Height="50px" Value='<%# Bind("Subject") %>'>
                        </FCKeditorV2:FCKeditor>
                     </EditItemTemplate>
                    <InsertItemTemplate>
                        <FCKeditorV2:FCKeditor ID="txtSubject" runat="server" BasePath="../FCKeditor/" ToolbarSet="Basic" Height="50px" Value='<%# Bind("Subject") %>'>
                        </FCKeditorV2:FCKeditor>
                       <asp:RequiredFieldValidator ID="rfvSubject" runat="server" 
                            ControlToValidate="txtSubject" Display="Dynamic" ErrorMessage="[Required]" 
                            SetFocusOnError="True" ValidationGroup="Insert"></asp:RequiredFieldValidator>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("Subject") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Body" SortExpression="Body">
                    <EditItemTemplate>
                        <FCKeditorV2:FCKeditor ID="txtBody" runat="server" ToolbarSet="CMS" BasePath="../FCKeditor/" Height="200px" Width="600px" Value='<%# Bind("Body") %>'>
                        </FCKeditorV2:FCKeditor>
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        <FCKeditorV2:FCKeditor ID="txtBody" runat="server" ToolbarSet="CMS" BasePath="../FCKeditor/" Height="200px" Width="600px" Value='<%# Bind("Body") %>'>
                        </FCKeditorV2:FCKeditor>
                       
                        <br />
                        <asp:RequiredFieldValidator ID="rfvBody" runat="server" 
                            ControlToValidate="txtBody" Display="Dynamic" ErrorMessage="[Required]" 
                            SetFocusOnError="True" ValidationGroup="Insert"></asp:RequiredFieldValidator>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("Body") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:CheckBoxField DataField="Active" HeaderText="Active" 
                    SortExpression="Active" />
                <asp:CommandField ShowInsertButton="True" ValidationGroup="Insert" />
            </Fields>
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#999999" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:DetailsView>
Please tell me what is wrong with the code. Well I am not having any instance of FCKeditor in code behind file so that I can not find this control in code behind file.
Any suggestion is most welcome.
Thank you...
 
Old February 22nd, 2010, 06:27 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Why oh why oh why do you not understand my message about posting in an appropriate forum? What part of "please post only messages related to this book in this forum" did you not understand? This is the last time I am responding to your messages here if they are not appropriate for this book. Pfffff.....

That said, take a look at the latest version of the editor now called CKEditor. It has options to bind the editor completely client side, removing all these problems.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Making full use of the FCKeditor control retroviz BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 June 22nd, 2008 07:04 AM
how to show fckeditor posted data? kherrerab ASP.NET 2.0 Professional 1 January 9th, 2007 05:30 PM
Advancing through a bound control nikotromus VB.NET 2002/2003 Basics 1 March 19th, 2006 04:36 AM
Need help with bound data kcrompt2 Classic ASP Professional 0 February 9th, 2005 12:37 AM
bound DTPicker control-urgent myth12345 VB Databases Basics 0 December 31st, 2004 06:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.