DNN Hosting Register Login
 
Latest Discussions Minimize
Video Size Problem by arshad786
Hi,     I am Arshad , i am trying to play video in my dnn site, but the problem ...
Configuration Error by koolexposure
I received this error on the last step of the Configuration Wizard. I have came ...
Serial Number by abudist
Hi, I have sent you emails regarding serial number for UVG. I'm stil waiting ...
Screenshot Capture Not Working by chadw3
Hello,I am using UVG 2.0 and am trying to use the Capture control in Edit Video ...
User uploads by OKCChopper
I have it set up so that regestered users can upload photos. I do not have a di...
Applying Watermark picture to existing images by Simone
I have recently upgraded to UMG 5.3 and after uploading some photos, I discovere...
Player auto plays select video? Not working by mg3hockey
Hello All,I am trying to get my player to  auto play a select video of several I...
File size by dharris
Where is it in the webconfig that I change the maximum file size for uploads?
Download link for media by aldeng
I realize you convert all video to flv, which is not a good download format.  Bu...
Podcasting Audio? by aldeng
The release notes say UVG has RSS feeds for video lists.  My application has a f...
Our Partnership Minimize
If you are looking for good DNN hosting, then PowerDNN is the best DNN host around!
Support Forum Minimize
Subject: Failed to compare two elements in the array
Prev Next
You are not authorized to post a reply.

Author Messages
soona rai
Posts:1
New Member

10/04/2008 4:58 AM  
Hi everybody,


i create own module for image slides . the selected images will show in  flash slide using

 dotnetnuke4.2.8 .


I have critical error :

    when i click the sort options(button move up slide and move down slide) in my module .

    This error shown:

  "Failed to compare two elements in the array."

 I checked my source code . i didnt found any mistake in my source code.

So, Please check where i made mistake in my source or else.

This is my module source :

/********************************************/
 
.ascx
       

        .ascx.cs
protected void Previous_Routine(object sender, CommandEventArgs e)
        {
            Controller obj = new Controller();
            List lstItems = objs.Gets(this.ModuleId);
            lstItems.Sort();
            int Sorter = 0;
            foreach (Info obj in lstItems)
            {
                obj.SortId = Sorter;
                objs.Update(obj);              
                Sorter++;
            }
            for (int i = 0; i < lstItems.Count; i++)
            {
                Info obj = (Info)lstItems[i]
                if (obj.ItemId == Convert.ToInt32(e.CommandArgument.ToString()))
                {
                    if (i == 0)
                    {
                        break;
                    }
                     obj.SortId--;
                     objs.Update(obj);                

                     obj = (Info)lstItems[i - 1]
                     obj.SortId++;
                     objs.Update(obj);                   
                }
            }

            //refresh cache
            SynchronizeModule();

            ExportXml(false);

            Response.Redirect(Request.Url.AbsoluteUri, true);
}



/****************************************************/

Please replay with good solution.

This help will  give 100% God Blessing.....


Thanks everybody













Pengtsen R
Posts:5417


10/04/2008 9:11 AM  
let me try to analyze your problem, you are going to sort a arraylist, and you get "Failed to compare two elements in the array." when run the sort code. your code is only a part of your control but please note to sort a arraylist you need to implement IComparer.Compare interface, did you?

Pengtsen R
http://www.bizmodules.net
You are not authorized to post a reply.
Forums > Ultra Media Gallery > General Questions > Failed to compare two elements in the array

Enterprise level DotNetNuke Solutions Copyright © 2005-2008 BizModules   |  Contact Us  |  Terms Of Use  |  Privacy Statement