Last post Jan 25, 2010 11:59 PM by Curt_C
Jan 18, 2010 02:00 PM|Benjo|LINK
I am hoping that someone is able to help me, I am trying to follow the book 'ASP.NET 3.5 Content Management System Development' by Curt Christianson but im having problems with the FCKeditor. I have VS2008 and SQL Server 2005 express, i have installed the
FCKeditor which appears on my edit.aspx page but when I hit the update button the page refreshes but does not save any changes to the text back in the database.
The code for the edit.aspx page is as follows.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="edit.aspx.vb" Inherits="edit" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<form id="form1" runat="server">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:BEWDCMSConnectionString3 %>"
SelectCommand="SELECT [Content] FROM [Content]" UpdateCommand="UPDATE [Content] SET Content=@Content">
<asp:FormView ID="FormView1" runat="server" DataSourceID ="SqlDataSource1" DefaultMode="Edit">
<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" Value='<%#Bind("Content") %>'> </FCKeditorV2:FCKeditor>
<asp:LinkButton id="button1" runat="server" commandName="Update" text="Update"/>
If anyone is able to offer any help with this then i would very much appreciate it as ive been stuck on this for some time now and im only page 53 of the book hahah
Jan 18, 2010 03:32 PM|Yousef_Jadallah|LINK
I used FCKeditor in the past , but when i want to retrieve data to that text, I fill it in code behind.
try to use DataReader or Dataset for that issue.
Jan 18, 2010 03:50 PM|Benjo|LINK
can FCKeditor not deal with this itself? It seems quite fundimental stuff for a text editor and the book seems to think that it should cope with this.
Jan 19, 2010 05:15 PM|Curt_C|LINK
IS there an error message being thrown of any kind on you? What you have should be fine. I'm wondering if there isn't a permission issue on the DB for the Update? I do know that post-publication there were some updates to FCK that we've run into but I don't
think this is one of those...
(and yeah, I'm one of the authors).
Jan 20, 2010 03:53 AM|Benjo|LINK
Who better to help than one of the authors :)
No, there is no error, when the update button is pressed the edit.aspx page just refreshes but nothing is written back to the database, The user accounts and DB have been configured as per the book so im a little bit stumped as to why the data is not updating.
unless I am seriously missing something.
Jan 20, 2010 08:35 AM|Curt_C|LINK
The DB setup question was just more of one wondering about the permissions. A number of users have had the folder permissions setup too restrictive and the app would only READ and not insert or update.
I'll try to recreate the error (or lack of) you mentioned this evening if I can get back to my office.
Jan 25, 2010 02:48 PM|Benjo|LINK
I take it you didn't have any luck with this ? I've completely ground to a halt!
Jan 25, 2010 11:59 PM|Curt_C|LINK
Sorry I haven't gotten back to you....haven't been at my pc, only on a work machine and i dont have the ability to load the book code on it.
The only thing I could think of to try at the moment is change:
UPDATE [Content] SET Content=@Content
UPDATE [Content] SET [Content]=@Content
Perhaps the Content in this case is a keyword and we had a typo.....
I'll try to recreate though, but you could skip that section and go on. What you do right there is really throw-away to familiarize yourself with the tools.