Tuesday, December 20, 2011

IComparer


class MessageCompare : IComparer<Messages>
{
    public int Compare(Messages x, Messages y)
    {
        if (y.Date.CompareTo(x.Date) != 0)
        {
            return y.Date.CompareTo(x.Date);
        }
        else
        {
            return 0;
        }

    }
}

Friday, December 9, 2011

Google Maps API V3 for ASP.NET


Introduction

Google Maps provides a flexible way to integrate maps to provide directions, location information, and any other kind of stuff provided by the Google Maps API in your web application. Although there are some articles in CP explaining about maps, in my article I am going to provide information about the latest Google Maps API V3 version. In this article, we will see some of the common techniques that are used with Google Maps. In order to work with the code sample explained below, you need to have some basic knowledge about JavaScript and C#.