Problem with the insert Image Button and Data Grid

Last post 08-06-2004, 9:07 AM by somgarga. 6 replies.
Sort Posts: Previous Next
  •  08-02-2004, 3:01 PM 1416

    Problem with the insert Image Button and Data Grid

    Every time I click on the insert image icon, I am gettiing the fowwling error:-

    Datetime is a type and can not be used as an expression. The error is in file Thublist.ascx Line 20. For some strange reason I am not able to select and copy the error message in the pop up window. I am also giving the code that I am using to create the cute editor.
     <CE:EDITOR id="txtHTMLChart" runat="server" Template="fontDropDown,sizeDropDown,Bold,Italic,Underline,Separator,JustifyLeft,JustifyCenter,JustifyRight,Separator,InsertTable,AddRow,DeleteRow,AddColumn,DeleteColumn,Separator,AddCell,DeleteCell,MergeCell,SplitCellSeparator,ImageGallery,ExternalImage,Separator" ShowBottomBar="false" BackColor="#FFC700" BgColor="#FFC700" CssClass="editordefault" Width="500" Height="200" Text='<%# DataBinder.Eval(Container.DataItem,"HTML_DATA")%>'>
     
    I will appreciate any help that could solve the problem.
     
    Also if I try to put the cute editor in the <ItemTemplate> of the datagrid. The VS can not creat the datagrid. The same code works fine though if I put it in the <edittemplate>. Has anyone faced this problem before.
     
    Thanks for all your help
  •  08-03-2004, 2:26 AM 1419 in reply to 1416

    Re: Problem with the insert Image Button and Data Grid

     
    Which version of CuteEditor are you using?
     
    Please check the Thublist.ascx line 20, make sure it is as followings:
     
     

    <ItemTemplate>

        <img border="0"

            src="<%# ThumbUrl((String)(DataBinder.Eval(Container.DataItem,"Name"))) %>"

            alt="<%# String_Name%>: <%# DataBinder.Eval(Container.DataItem, "Name")%>&#10;&#13;

            <%# String_Size%>: <%# (((System.IO.FileInfo)Container.DataItem).Length/1024).ToString("n0")%> KB&#10;&#13;

            <%# String_Createddate%>: <%# DataBinder.Eval(Container.DataItem, "CreationTime") %>&#10;&#13;

            <%# String_Modifieddate%>: <%# DataBinder.Eval(Container.DataItem, "LastWriteTime")%>"

            onmouseover="Check(this,1)"

            onmouseout="Check(this,0)"

            onclick="insert('<%# ImageUrl((String)(DataBinder.Eval(Container.DataItem,"Name"))) %>')"

            style="BORDER: white 1px solid" align="center">

    </ItemTemplate>

     

     

    Keep me posted.

     


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  08-03-2004, 12:28 PM 1423 in reply to 1419

    Re: Problem with the insert Image Button and Data Grid

    Thansk for your response. I changed the code to in the Thublist.ascx file as highlighted by you. But now I have started getting another error which says -
     
    "FileInfo is a type in IO and can not be used as an expression". Here is code from my Thublist.ascx file
     
     <img border="0" src="<%# ThumbUrl((String)(DataBinder.Eval(Container.DataItem,"Name"))) %>" alt="<%# String_Name%>: <%# DataBinder.Eval(Container.DataItem, "Name")%>&#10;&#13;<%# String_Size%>: <%# (((System.IO.FileInfo)Container.DataItem).Length/1024).ToString("n0")%> KB&#10;&#13;<%# String_Createddate%>: <%# ((DataBinder.Eval(Container.DataItem, "CreationTime"))).ToShortDateString()%>&#10;&#13;<%# String_Modifieddate%>: <%# (DataBinder.Eval(Container.DataItem, "LastWriteTime")).ToShortDateString()%>" onmouseover="Check(this,1)" onmouseout="Check(this,0)" onclick="insert('<%# ImageUrl((String)(DataBinder.Eval(Container.DataItem,"Name"))) %>')" style="BORDER: white 1px solid" align="center">
     
    We are using version V3.0.
     
    I appreciate your help.
     
     
  •  08-05-2004, 8:57 PM 1435 in reply to 1423

    Re: Problem with the insert Image Button and Data Grid

    I'm having the same problem. So what's the answer?
  •  08-06-2004, 12:20 AM 1436 in reply to 1423

    Re: Problem with the insert Image Button and Data Grid

    Hi guys,
     
    I think we found the problem.
     
    There is a user control called Thumblist.ascx in the CuteEditor_Files\Scripts\ folder.  When you are using the Visual Studio IDE to include the "CuteEditor_Files" folder into your Visual Studio project, it prompts you to create a code-behind file (.vb extention) for the Thumblist.ascx.
     
    If you select "Yes", the Thumblist.ascx will be changed to a VB.NET user control by the Visual Studio IDE.

    It becomes

    <%@ Control Language="vb" Debug="true" EnableViewState="true"AutoEventWireup="false" Inherits="CuteEditor.Include.ThumbList"
    CodeBehind="ThumbList.ascx.cs" %>
     
    That makes all the C# funtions in this user control  stop work.
     
    To fix that, just download the CuteEditor for .NET again and replace the Thumblist.ascx file in your project with the one in the download package.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  08-06-2004, 12:25 AM 1437 in reply to 1435

    Re: Problem with the insert Image Button and Data Grid

  •  08-06-2004, 9:07 AM 1444 in reply to 1436

    Re: Problem with the insert Image Button and Data Grid

    Thanks for your help. It is working now.
View as RSS news feed in XML