Live Support, Chat, Upload Control and Rich Text Editor
Welcome to Support forums Sign in | Join | Help |Client Center

Re: 'answer<%# DataBinder.Eval(Container.DataItem, "QuestionId") %>' is not a valid identifier.

  •  07-15-2009, 2:35 AM

    Re: 'answer<%# DataBinder.Eval(Container.DataItem, "QuestionId") %>' is not a valid identifier.

    Hi bala_pragasam,
     
    Cute Editor  is a server control, properties ID can not be binding, if you want to bing the text, tye the example below
    1. <%@ Page Language="C#" AutoEventWireup="True" Debug="true" %>   
    2.   
    3. <%@ Import Namespace="System.Data" %>   
    4. <%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>   
    5. <html>   
    6.   
    7. <script runat="server">   
    8.     
    9.     ICollection CreateDataSource()   
    10.     {   
    11.         DataTable dt = new DataTable();   
    12.         DataRow dr;   
    13.         dt.Columns.Add(new DataColumn("StringValue"typeof(String)));   
    14.         for (int i = 0; i < 2; i++)   
    15.         {   
    16.             dr = dt.NewRow();   
    17.             dr[0] = "Description for item " + i.ToString();   
    18.             dt.Rows.Add(dr);   
    19.         }   
    20.         DataView dv = new DataView(dt);   
    21.         return dv;   
    22.     }   
    23.     void Page_Load(Object sender, EventArgs e)   
    24.     {   
    25.         if (!IsPostBack)   
    26.         {   
    27.             ItemsList.DataSource = CreateDataSource();   
    28.             ItemsList.DataBind();   
    29.         }   
    30.     }   
    31.     
    32. </script>   
    33.   
    34. <body>   
    35.     <form id="Form1" runat="server">   
    36.         <h3>   
    37.             Example</h3>   
    38.         <asp:DataList ID="ItemsList" runat="server">   
    39.             <ItemTemplate>   
    40.                 <CE:Editor ID="editor1" runat="server" Text='<%# Eval("StringValue") %>'>   
    41.                 </CE:Editor>   
    42.             </ItemTemplate>   
    43.         </asp:DataList>   
    44.     </form>   
    45. </body>   
    46. </html>  
    Regards,
     
    ken
View Complete Thread
Powered by ASP.Net
Copyright 2003 - 2017 CuteSoft Components Inc.. All rights reserved.