Setting a value for the text

Last post 08-04-2009, 10:05 AM by joe12312. 2 replies.
Sort Posts: Previous Next
  •  08-04-2009, 8:12 AM 54471

    Setting a value for the text

    Hi, I'm new to this editor and I previously used FCKeditor. With FCKeditor it was possible to just type:
    1. Value='<%# Bind("ArticleBody") %>'  
    however, how can I do this with CuteSoft editor?
    I use a Form View to create the article and this is my page code:
    1. <h3>New Article</h3>   
    2.     <asp:FormView ID="FormView1" runat="server" DataKeyNames="ArticleID"  
    3.         DefaultMode="Insert" Width="100%"  
    4.         DataSourceID="NewArticle">   
    5.         <InsertItemTemplate>   
    6.         <table width="100%">   
    7.         <tr>   
    8.         <td width="100px" valign="top"><b>Title</b></td><td align="left"><asp:TextBox ID="ArticleTitleTextBox" runat="server" width="99%"  
    9.                 Text='<%# Bind("ArticleTitle") %>' /></td>   
    10.         </tr>   
    11.         <tr>   
    12.         <td valign="top"><b>Category</b></td><td align="left">   
    13.         <asp:DropDownList ID="DropDownList1" runat="server" SelectedValue='<%# Bind("ParentCategoryID") %>' Width="100%"   
    14.         DataSourceID="AccessDataSource1" DataTextField="CategoryTitle" DataValueField="CategoryID" >   
    15. </asp:DropDownList>   
    16.         </td>   
    17.         </tr>   
    18.         <tr>   
    19.         <td valign="top"><b>Body</b></td>   
    20.         <td align="left">   
    21.         <CE:Editor id="Editor1" runat="server" ='<%# Bind("ArticleBody") %>' />    
    22.         </td>   
    23.         </tr>   
    24.         </table>   
    25.         <div align="right">   
    26.                 <asp:Button ID="InsertButton" runat="server" CausesValidation="true" CommandName="Insert" Text="Post Article" Width="100" /></div>   
    27.         </InsertItemTemplate>   
    28.     </asp:FormView>   
    29.     <asp:AccessDataSource ID="NewArticle" runat="server"    
    30.         ConflictDetection="CompareAllValues" DataFile="~/App_Data/ASPNetDB.mdb"     
    31.         InsertCommand="INSERT INTO [Blog_Articles] ([ArticleTitle], [ParentCategoryID], [ArticleBody]) VALUES (?, ?, ?)"    
    32.         OldValuesParameterFormatString="original_{0}">   
    33.         <InsertParameters>   
    34.             <asp:Parameter Name="ArticleTitle" Type="String" />   
    35.             <asp:Parameter Name="ParentCategoryID" Type="Int32" />   
    36.             <asp:Parameter Name="ArticleBody" Type="String" />   
    37.         </InsertParameters>   
    38.     </asp:AccessDataSource>   
    39.     <asp:AccessDataSource ID="AccessDataSource1" runat="server"    
    40.         DataFile="~/App_Data/ASPNetDB.mdb"    
    41.         SelectCommand="SELECT [CategoryID], [CategoryTitle] FROM [Blog_Categories]">   
    42.     </asp:AccessDataSource>  
    Any help would be much appreciated!
  •  08-04-2009, 9:12 AM 54474 in reply to 54471

    Re: Setting a value for the text

  •  08-04-2009, 10:05 AM 54477 in reply to 54474

    Re: Setting a value for the text

    I did it!
    I just set the following:
    1. <CE:Editor id="Editor1" runat="server" Text='<%# Bind("ArticleBody") %>' />  
     That did the trick!
View as RSS news feed in XML