Fatal error in Paging - InsertGallery

Last post 12-11-2007, 8:52 PM by eunice. 13 replies.
Sort Posts: Previous Next
  •  08-30-2006, 3:33 AM 22187

    Fatal error in Paging - InsertGallery

    Hi
     
    I get an error when I press the paging links in the InsertGallery dialog. I store pictures in a database, and everything except paging works fine, and I have to say, that paging worked fine before version 5.3.
     
    I have tried to debug the code (SqlFileStorage.cs) and have found out, that the error occurs after the return value of "return (CuteEditor.Impl.FileItem[])arr.ToArray(typeof(CuteEditor.Impl.FileItem)) in the method GetFileItems.
    The error message says:
     
    UserHostAddress: 172.31.48.253
    UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
    AcceptTypes: */*
    UserLanguages: da
    ---> System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.FormatException: Input string was not in a correct format.
       at System.Text.StringBuilder.FormatError()
       at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
       at System.String.Format(IFormatProvider provider, String format, Object[] args)
       at System.String.Format(String format, Object arg0, Object arg1)
       at CuteEditor.Dialogs.ThumbList.CreateNavBar(PlaceHolder plLinks)
       at CuteEditor.Dialogs.ThumbList.Item_DataBound(Object sender, DataListItemEventArgs e)
       at System.Web.UI.WebControls.DataList.OnItemDataBound(DataListItemEventArgs e)
       at System.Web.UI.WebControls.DataList.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem)
       at System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource)
       at System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e)
       at System.Web.UI.WebControls.BaseDataList.DataBind()
       at CuteEditor.Dialogs.ThumbList.BindThumbList()
       at CuteEditor.Dialogs.ThumbList.Page_Load(Object Src, EventArgs e)
       at System.Web.UI.Control.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain()
       --- End of inner exception stack trace ---
       at System.Web.UI.Page.HandleError(Exception e)
       at System.Web.UI.Page.ProcessRequestMain()
       at System.Web.UI.Page.ProcessRequest()
       at System.Web.UI.Page.ProcessRequest(HttpContext context)
       at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
       --- End of inner exception stack trace ---
     
    As mentioned in the text, the errors occurs because of:
    System.FormatException: Input string was not in a correct format.
     
    I have checked every elements in the array and everything seems to be OK.
     
    It is an critical error, because the error shows up in the error log many times.
     
    Do you have a soluton?
     
    /Torben
     
     
     
     
  •  08-30-2006, 12:20 PM 22199 in reply to 22187

    Re: Fatal error in Paging - InsertGallery

  •  08-31-2006, 4:28 AM 22238 in reply to 22199

    Re: Fatal error in Paging - InsertGallery

    Hi
     
    Yes, I have tried that. In an earlier release it works fine even without CustomFileProvider.dll! So I don't think this file makes a different. I use the dll included in the zip. I have not compiled my own CustomFileProvider.dll.
     
    Our current production relase works fine, but the new release which runs in our develpment- and test enviroment doesn't work, and we will soon deploy a new production release, but this error stops us from doing that. We can't see any differences in the settings between the diffent environments.
     
    I send the whole content of the modified SqlFileStorage.cs file. Maybe that you can see some suspicious things in the file.
     
    /Torben
     
     
    namespace CustomFileProvider.SqlSample
    {
     using System;
     using System.Collections;
     using System.IO;
     using System.Data;
     using System.Data.SqlClient;
     using System.Web;
     using System.Text;
     using CustomFileProvider.SqlSample;
     using KMD.OA.Infrastruktur;
     public class SqlFileStorage : CuteEditor.Impl.FileStorage
     //public class SqlFileStorage : NormalPage
     {
      /// <summary>
      /// Connection String
      /// </summary>
      ///
      public string ConnectionString= KMD.OA.Util.General.GetEnvironmentKey("CS_OA6001");
      HttpContext c;
      SqlConnection conn;
      CuteEditor.EditorSetting setting;
      
      /// <summary>
      /// the aspx page whose sole responsibility is to display a specific image
      /// </summary>
      string downfile;
      
      public SqlFileStorage(HttpContext context):base(context)
      {
       c=context;
       setting=CuteEditor.EditorSetting.GetFromContext(c,true);
       
       //set the downloadfile RUL
       downfile=setting["DownFile"];
       conn=new SqlConnection();
      }
      //EnterQuery , make sure the connection is open
      #region protected IDisposable EnterQuery()
      protected IDisposable EnterQuery()
      {
       
       if(conn.State==ConnectionState.Closed)
       {
        conn.ConnectionString=ConnectionString;
        conn.Open();
        
        Disposer d=new Disposer();
        d.fs=this;
        return d;
       }
       
       return new Disposer();
      }
      class Disposer : IDisposable
      {
       public SqlFileStorage fs;
       public void Dispose()
       {
        if(fs!=null)
        {
         fs.conn.Dispose();
         fs=null;
        }
       }
      }
      #endregion
      public void ExecuteNonQuery(string commandtext,params object[] args)
      {
       ExecuteReader(commandtext,args).Close();
      }
      
      static public void SetParameter(SqlParameterCollection pcoll,string pname,object obj)
      {
       if(pcoll==null)throw(new ArgumentNullException("pcoll"));
       if(obj==null||Convert.IsDBNull(obj))
       {
        pcoll.Add(pname,SqlDbType.NVarChar,50).Value=DBNull.Value;
        return;
       }
       if(obj is string)
       {
        if(obj.ToString().Length>4000)
        {
         pcoll.Add(pname,SqlDbType.NText).Value=obj;
         return;
        }
       }
       else if(obj is byte[])
       {
        byte[] bs=(byte[])obj;
        if(bs.Length>8000)
        {
         pcoll.Add(pname,SqlDbType.Binary).Value=bs;
         return;
        }
       }
       else if(obj is SqlParameter)
       {
        SqlParameter sp=(SqlParameter)obj;
        //pcoll.Add(sp);
        pcoll.Add(new SqlParameter(pname,sp.SqlDbType,sp.Size,sp.Direction,true,sp.Precision,sp.Scale,sp.SourceColumn,sp.SourceVersion,sp.Value));
        return;
       }
       else if(obj is DateTime)
       {
        pcoll.Add(pname,SqlDbType.NVarChar,50).Value=((DateTime)obj).ToString("yyyy-MM-dd HH:mm:ss")+"."+((DateTime)obj).Millisecond.ToString().PadLeft(3,'0');
        return;
       }
       pcoll.Add(pname,obj);
      }
      //get the id of an item
      protected int GetItemId(string path)
      {
       int intSkoleId = Convert.ToInt32(HttpContext.Current.Session["SkoleId"]);
       int intBrugerId = General.UserPersonId();
       StringBuilder strSQL = new StringBuilder();
       strSQL.Append("select id from Websidefil where path='");
       strSQL.Append(path);
       strSQL.Append("' and Fk_Institution_Id=");
       strSQL.Append(intSkoleId);
       //Er det ikke en fælles mappe kan samme filnavn forekomme flere gange - dog kun 1 gang pr. bruger
       if (path.StartsWith("/Skolen") == false)
       {
        strSQL.Append(" and Fk_Owner_Id=");
        strSQL.Append(intBrugerId);
       }
       using(EnterQuery())
       {    
        //using(SqlDataReader reader=ExecuteReader("select id from Websidefil where path={0} and Fk_Owner_Id=" + intBrugerId + " and Fk_Institution_Id={2}",path))
        using(SqlDataReader reader=ExecuteReader(strSQL.ToString(),path))
        {
         if(reader.Read())
          return reader.GetInt32(0);
        }
       }
       return 0;
      }
      //get the path of an item
      protected string GetItemPath(int id)
      {
       using(EnterQuery())
       {
        using(SqlDataReader reader=ExecuteReader("select path from Websidefil where id={0}",id))
        {
         if(reader.Read())
          return reader.GetString(0);
        }
       }
       return null;
      }
      public override CuteEditor.Impl.DirectoryItem[] GetDirectoryItems(string dirpath,bool getcount)
      {
       dirpath=CalcPath(VirtualRoot,dirpath);
       ArrayList arr=new ArrayList();
       using(EnterQuery())
       {
        using(SqlDataReader reader=ExecuteReader("select * from Websidefil where isdir=1 and parentpath={0} order by path ",dirpath))
       {
         while(reader.Read())
         {
          CuteEditor.Impl.DirectoryItem item=new CuteEditor.Impl.DirectoryItem();
          item.Path=reader["path"].ToString();
          item.Name=Path.GetFileName(item.Path);
          arr.Add(item);
         }
        }
        if(getcount)
        {
         foreach(CuteEditor.Impl.DirectoryItem item in arr)
         {
          using(SqlDataReader reader=ExecuteReader("select count(*) from Websidefil where parentpath={0}",item.Path))
          {
           reader.Read();
           item.ChildCount=reader.GetInt32(0);
          }
         }
        }
       }
       return (CuteEditor.Impl.DirectoryItem[])arr.ToArray(typeof(CuteEditor.Impl.DirectoryItem));
      }
     
      public override CuteEditor.Impl.FileItem[] GetFileItems(string dirpath, string searchpattern)
      {
       dirpath=CalcPath(VirtualRoot,dirpath);
       int intSkoleId = Convert.ToInt32(HttpContext.Current.Session["SkoleId"]);
       if (intSkoleId < 1)
        return null;
       int intBrugerId = General.UserPersonId();
       
       StringBuilder strSQL = new StringBuilder();
       switch (dirpath)
       {        
        case "/":
         strSQL.Append("select id,path,createdt,filename,filesize from Websidefil where isdir=0 and parentpath={0} and path like {1} and Fk_Institution_Id = ");
         strSQL.Append(intSkoleId);
         strSQL.Append(" order by path ");
         break;
        case "/Skolens":
         strSQL.Append("select id,path,createdt,filename,filesize from Websidefil where isdir=0 and parentpath={0} and path like {1} and Fk_Institution_Id = ");
         strSQL.Append(intSkoleId);
         strSQL.Append(" order by path ");
         break;
        case "/Mine":
         strSQL.Append("select id,path,createdt,filename,filesize from Websidefil where isdir=0 and parentpath={0} and path like {1} and Fk_Institution_Id = ");
         strSQL.Append(intSkoleId);
         strSQL.Append(" and Fk_Owner_Id = ");
         strSQL.Append(intBrugerId);
         strSQL.Append(" order by path ");
         break;
        default:
         dirpath="/";
         strSQL.Append("select id,path,createdt,filename,filesize from Websidefil where isdir=0 and parentpath={0} and path like {1} and Fk_Institution_Id = ");
         strSQL.Append(intSkoleId);
         strSQL.Append(" order by path ");
         break;
       }

       ArrayList arr=new ArrayList();
       using(EnterQuery())
       {
        if(searchpattern==null)searchpattern="%";
        searchpattern=searchpattern.Replace("*","%");
        using(SqlDataReader reader=ExecuteReader(strSQL.ToString(),dirpath,searchpattern))
        //using(SqlDataReader reader=ExecuteReader("select id,path,createdt,filename,filesize from Websidefil where isdir=0 and parentpath={0} and path like {1} order by path ",dirpath,searchpattern))
        {
         while(reader.Read())
         {
          CuteEditor.Impl.FileItem item=new CuteEditor.Impl.FileItem();
          item.Path=reader["path"].ToString();
          item.Name=Path.GetFileName(item.Path);
          item.Length=(int)reader["filesize"];
          item.CreationTime=item.LastWriteTime=(DateTime)reader["createdt"];
          item.Url=downfile+"?fileid="+reader["id"];
          arr.Add(item);
         }
        }
       }
       return (CuteEditor.Impl.FileItem[])arr.ToArray(typeof(CuteEditor.Impl.FileItem));
      }
      /// <summary>
      /// Get the display path of the dirpath
      /// </summary>
      public override string GetDirectoryText(string dirpath)
      {
       dirpath=CalcPath(VirtualRoot,dirpath);
       return dirpath;
      }
      /// <summary>
      /// GetDirectorySize
      /// </summary>
      /// <param name="dirpath"></param>
      /// <returns></returns>
      public override double GetDirectorySize(string dirpath)
      {
       return 0;
      }  
      public override string GetParentDirectory(string dirpath)
      {
       dirpath=CalcPath(VirtualRoot,dirpath);
       if(dirpath=="/")
        return null;
       try
       {
        return Path.GetDirectoryName(dirpath);
       }
       catch
       {
        throw(new Exception(dirpath));
       }
      }
      private string GetFileDirectory(string filepath)
      {
       filepath=CalcPath(VirtualRoot,filepath);
       return Path.GetDirectoryName(filepath);
      }
      
      public override string GetFileName(string filepath)
      {
       filepath=CalcPath(VirtualRoot,filepath);
       return Path.GetFileName(filepath);
      }
      
      public override byte[] GetFileData(string filepath)
      {
       filepath=CalcPath(VirtualRoot,filepath);
       using(EnterQuery())
       {
        using(SqlDataReader reader=ExecuteReader("select filedata from Websidefil where path={0}",filepath))
        {
         if(reader.Read())
          return (byte[])reader[0];
        }
       }
       return null;
      }
      
      
      public override string CreateFile(string dirpath, string filename, byte[] filedata)
      {
       int intSkoleId = Convert.ToInt32(HttpContext.Current.Session["SkoleId"]);
       if (intSkoleId < 1)
        return "";
       int intBrugerId = General.UserPersonId();
       dirpath=CalcPath(VirtualRoot,dirpath);
       filename=Path.GetFileName(filename);
       string newpath=Path.Combine(dirpath,filename).Replace(@"\","/");
       using(EnterQuery())
       {
        if(dirpath=="/")
        { 
         //throw(new Exception("Du skal udpege en mappe"));
         return "abc";
        }
    //    Dette tjek er ikke nødvendigt, da mulige mapper er oprettet i databasen og kun kan vælges/udpeges
    //    if(dirpath!="/")
    //    {
    //     int dirid=GetItemId(dirpath);
    //     if(dirid==0)throw(new Exception("path '"+dirpath+"' ikke fundet"));
    //    }
        int fileid=GetItemId(newpath);
        if(fileid!=0)
        {
         //Der udføres ikke opdatering af filer
         throw(new DuplicateNameException("Der findes allerede en fil i denne mappe med samme navn!"));
         //ExecuteNonQuery("update Websidefil set createdt={1},filesize={2},filedata={3} where id={0}",fileid,DateTime.Now,filedata.Length,filedata);
        }
        else
        {
         ExecuteNonQuery("insert into Websidefil (path,isdir,parentpath,createdt,filename,filesize,filedata,Fk_Owner_Id,Fk_Institution_Id) values ({0},0,{1},{2},{3},{4},{5},{6},{7})"
          ,newpath
          ,dirpath
          ,DateTime.Now
          ,filename
          ,filedata.Length
          ,filedata
          ,intBrugerId
          ,intSkoleId
          );
        }
        return newpath;
       }
      }
      public override string CreateDirectory(string dirpath, string dirname)
      {
       dirpath=CalcPath(VirtualRoot,dirpath);
       dirname=Path.GetFileName(dirname);
       string newpath=Path.Combine(dirpath,dirname).Replace(@"\","/");
       using(EnterQuery())
       {
        if(dirpath!="/")
        {
         int dirid=GetItemId(dirpath);
         if(dirid==0)throw(new Exception("path '"+dirpath+"' not found"));
        }
        if(GetItemId(newpath)==0)
        {
         ExecuteNonQuery("insert into Websidefil (path,isdir,parentpath) values ({0},1,{1})",newpath,dirpath);
        }
        return newpath;
       }
      }
      
      
      public override void DeleteDirectory(string dirpath)
      {
       dirpath=CalcPath(VirtualRoot,dirpath);
       using(EnterQuery())
       {
        ExecuteNonQuery("delete from Websidefil where path={0}",dirpath);
        ExecuteNonQuery("delete from Websidefil where path like {0}+'/%'",dirpath);
       }
      }
      public override void DeleteFile(string filepath)
      {
       filepath=CalcPath(VirtualRoot,filepath);
       using(EnterQuery())
       {
        ExecuteNonQuery("delete from Websidefil where isdir=0 and path={0}",filepath);
       }
      }
      
      
      public override string RenameDirectory(string dirpath, string name)
      {
       dirpath=CalcPath(VirtualRoot,dirpath);
       string dir=GetFileDirectory(dirpath);
       string newpath=Path.Combine(dir,name).Replace(@"\","/");
       using(EnterQuery())
       {
        ExecuteNonQuery("update Websidefil set path={0} where path={1}",newpath,dirpath);
        ExecuteNonQuery("update Websidefil set path={0}+right(path,len(path)-{2}) , parentpath={0}+right(parentpath,len(parentpath)-{2}) where path like {1}+'/%'",newpath,dirpath,dirpath.Length);
       }
       return newpath;
      }
      public override string RenameFile(string filepath, string name)
      {
       filepath=CalcPath(VirtualRoot,filepath);
       string dir=GetFileDirectory(filepath);
       string newpath=Path.Combine(dir,name).Replace(@"\","/");
       using(EnterQuery())
       {
        ExecuteNonQuery("update Websidefil set path={0} where path={1}",newpath,filepath);
       }
       return newpath;
      }

      public override string MoveDirectory(string dirpath, string targetdir)
      {
       dirpath=CalcPath(VirtualRoot,dirpath);
       targetdir=CalcPath(VirtualRoot,targetdir);
       string name=Path.GetFileName(dirpath);
       string newpath=Path.Combine(targetdir,name).Replace(@"\","/");
       using(EnterQuery())
       {
        ExecuteNonQuery("update Websidefil set path={0} ,parentpath={2} where path={1}",newpath,dirpath,targetdir);
        ExecuteNonQuery("update Websidefil set path={0}+right(path,len(path)-{2}) , parentpath={0}+right(parentpath,len(parentpath)-{2}) where path like {1}+'/%'",newpath,dirpath,dirpath.Length);
       }
       return newpath;
      }
      public override string MoveFile(string filepath, string targetdir)
      {
       filepath=CalcPath(VirtualRoot,filepath);
       GetFileDirectory(filepath);
       targetdir=CalcPath(VirtualRoot,targetdir);
       string newfilepath=targetdir.TrimEnd('/')+"/"+GetFileName(filepath);
     
       using(EnterQuery())
       {
        ExecuteNonQuery("update Websidefil set path={2} , parentpath={1} where path={0}",filepath,targetdir,newfilepath);
       }
       return newfilepath;
      }
      public override string CopyDirectory(string dirpath, string targetdir)
      {
       dirpath=CalcPath(VirtualRoot,dirpath);
       targetdir=CalcPath(VirtualRoot,targetdir);
       using(EnterQuery())
       {
        throw(new NotImplementedException());
       }
      }
      public override string CopyFile(string filepath, string targetdir)
      {
       using(EnterQuery())
       {
        throw(new NotImplementedException());
       }
      }
      
      string root="/";
      public override string VirtualRoot
      {
       get
       {
        return root;
       }
       set
       {
        if(value==null)
         throw(new ArgumentNullException("VirtualRoot"));
        if(value.StartsWith("~/"))
         value=value.Remove(0,1);
        if(!value.StartsWith("/"))
         throw(new ArgumentException("Stien skal pege på roden"));
        root=value;
        if(root!="/")
         root=root.TrimEnd('/');
       }
      }
      private string CalcPath(string path, string relpath)
      {
       path=path.Replace('\\','/');
       if(!path.StartsWith("/"))
        path=CalcPath(VirtualRoot,path);
       if(relpath==null||relpath=="")
       {
        return path;
       }
       if(relpath.StartsWith("/"))
       {
        if(relpath.IndexOf("..")!=-1)
         throw(new Exception("Den absolutte sti må ikke indeholde '..'"));
        if(relpath=="/")
         return relpath;
        //Et lille hack, som er indført for at håndtere den fejl der opstår i Editoren
        //hvis brugeren trykker på mappe ikonet ud for mappens navn.
        if(relpath.Length > 8)
        {
         string strReturn = "";
         string[] strArr = relpath.Split('/');
         if (relpath.EndsWith("/Skolens"))
          strReturn = "/Skolens";
         if (relpath.EndsWith("/Mine"))
          strReturn = "/Mine";
     
         if (strArr.Length > 2)
         {
          if (strArr[strArr.Length-2] == "Skolens")
           strReturn = "/Skolens/" + strArr[strArr.Length-1];
          if (strArr[strArr.Length-2] == "Mine")
           strReturn = "/Mine/" + strArr[strArr.Length-1];
         }
         return strReturn;
        }
        return relpath.TrimEnd('/');
       }
       foreach(string str in relpath.Split(@"/\".ToCharArray()))
       {
        if(str=="")
         continue;
        if(str=="..")
        {
         int pos=-1;
         if(path!=null&&path!="")
          pos=path.LastIndexOf('/',path.Length-2);
         if(pos==-1)
         {
          path=null;
         }
         else
         {
          path=path.Substring(0,pos);
         }
        }
        else
        {
         path+="/"+str;
        }
       }
       if(path=="")
        return "/";
       return path.Replace("//","/");
      }
      public override string GetFileUrl(string filepath)
      {
       filepath=CalcPath(VirtualRoot,filepath);
       return downfile+"?fileid="+GetItemId(filepath);
      }
      public override string TranslateTargetDirectory(string dirpath, string relpath)
      {
       if(relpath.StartsWith("/"))
        return (VirtualRoot+relpath).Replace("//","/");
       return CalcPath(dirpath,relpath);
      }
      
      //execute the reader , commandtext is formatted by string.Format
      #region SqlDataReader ExecuteReader(string commandtext,params object[] args)

      SqlDataReader ExecuteReader(string commandtext,params object[] args)
      {
       int len=args==null?0:args.Length;
       SqlCommand cmd=new SqlCommand(commandtext,conn);
       
       object[] argnames=new object[len];
       SqlParameterCollection ps=cmd.Parameters;
       for(int i=0;i<len;i++)
       {
        object val=argsIdea;
        string pname="@cdq_"+i;
        SetParameter(ps,pname,val);
         
        if(val is DateTime)
        {
         argnamesIdea="CONVERT(DATETIME,"+pname+")";
        }
        else
        {
         argnamesIdea=pname;
        }
       }
        
       commandtext=string.Format(commandtext,argnames);
       cmd.CommandText=commandtext;
       return cmd.ExecuteReader();
       
      }
      
      #endregion
     }
    }
     
     
     
  •  01-31-2007, 7:22 AM 26294 in reply to 22238

    Re: Fatal error in Paging - InsertGallery

    Same error in my application, I'm not storing files in the database.
    Only paging in InsertGallery is not working with the latest release of cuteeditor 5.3.
    It works fine with 5.2
    Any ideas what could be wrong!
  •  01-31-2007, 8:51 AM 26296 in reply to 26294

    Re: Fatal error in Paging - InsertGallery

    michl:
    Same error in my application, I'm not storing files in the database.
    Only paging in InsertGallery is not working with the latest release of cuteeditor 5.3.
    It works fine with 5.2
    Any ideas what could be wrong!
     
    Do you have problems with the examples included in the download package?
     
    If not, please make sure you update the DLL and all the client files when upgrading.
     
    If yes, can you explain the error message in detaills or post a screenshot?
     
     

    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

  •  11-13-2007, 8:05 PM 35048 in reply to 26296

    Re: Fatal error in Paging - InsertGallery

    Hi,
     
     
    I also facing the same problem. But mine is version 3.0. Should I update the DLL? I am storing the images in Uploads folder.
     
    The error message : 'document_ctl0.ThumbList1_hdnCurPage' is nulll or not an object.
    URL: xx/select_image.aspx
     
    Please help.
     
    thanks.
     
    /eunice
  •  11-13-2007, 9:12 PM 35049 in reply to 35048

    Re: Fatal error in Paging - InsertGallery

    eunice:
    Hi,
     
     
    I also facing the same problem. But mine is version 3.0. Should I update the DLL? I am storing the images in Uploads folder.
     
    The error message : 'document_ctl0.ThumbList1_hdnCurPage' is nulll or not an object.
    URL: xx/select_image.aspx
     
    Please help.
     
    thanks.
     
    /eunice
     
    eunice,
     
    Can you just upgrade to version 6.0? The upgrade is free.

    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

  •  11-14-2007, 1:23 AM 35052 in reply to 35049

    Re: Fatal error in Paging - InsertGallery

    Thanks for ur reply.
     
    I have downloaded the version 6.0 and followed the guidelines to deploy it.
     
    But I got error and the cute editor din appear.
     
    What I had done are: (I am using FTP)
     
    1) overwrite d existing (v 3.0 ) bin folder.
    2) upload the whole folder CuteSoft_Client
    3) remain the same file of addSubPage.aspx (where I placed the cute editor)
    4) remain the uploads folder
     
    Then I get this error message: Object reference not set to an instance of an object.
     
    what's wrong?Did I miss to upload any files? 
     
     
     
  •  11-14-2007, 9:16 AM 35061 in reply to 35052

    Re: Fatal error in Paging - InsertGallery

    Remove CuteEditor.dll reference from your project and add the reference to the new CuteEditor.dll. Then recompile your project.


    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

  •  11-15-2007, 1:36 AM 35092 in reply to 35061

    Re: Fatal error in Paging - InsertGallery

    yes. It works. Thanks.
     
    Now I face another problem, but is is not related to cute editor, it is the code behind. Do u know which asp forum and asp.net forum that I can join to search for solution?
     
    Anyway, thank you very much.
  •  12-11-2007, 3:58 AM 35757 in reply to 35092

    Re: Fatal error in Paging - InsertGallery

    Hi,
     
    I still stuck with the cute editor.
     
    1)When I delete the version3.0 dll, and replace with dll version 6.0, then recompile the project, but some errors accured which like below:
     
     Type 'CuteEditor.Editor' is not defined.
     
    How to solve this problem?
     
    2)Last time my form is using cute editor version 3.0, where I placed it in the textarea named txtContent. Now, when I upgrade cute editor to version 6.0,
    It only appears when id= Editor1, just like the code below.
     
    CE:Editor id="Editor1" runat="server" CssClass="ultimate" DisableItemList="Save, Print" ShowHtmlMode="true" RestrictUploadedImageDimension="False" AutoResizeUploadedImages="False" Width="450px"
     
     
    But when I edit the id to txtContent, it prompts errors :
     
    Parser Error Message: Could not load file or assembly 'CuteEditor, Version=3.0.1672.21223, Culture=neutral, PublicKeyToken=3858aa6802b1223a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    Source Error:

    Line 1: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="addSubPage2.aspx.vb" Inherits="project.addSubPage"%> Line 2: <%@ Register TagPrefix="uc1" TagName="leftnav" Src="adm_leftnav.ascx" %> Line 3: <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>

     
    Please kindly to assist. Thank you very much. Hope can hear from you soon.
     
     
     
  •  12-11-2007, 12:36 PM 35767 in reply to 35757

    Re: Fatal error in Paging - InsertGallery

    eunice,
     
    Please follow the steps below:
     
    1. Remove the CuteEditor.dll reference from your project
     
    2. Add the reference to the CuteEditor.Dll(6.0)
     
    3. Recompile your project
     
     

    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

  •  12-11-2007, 8:52 PM 35770 in reply to 35767

    Re: Fatal error in Paging - InsertGallery

    Hi,
     
     
    Thank you very much. Appreciate....
     
    Finally, I found what's the error. I am using Framework 1.1, but I dump cuteeditor framework 2.0 into bin folder.
    Will be careful...haha...
     
     
    Thanks.
     
     
View as RSS news feed in XML