Skip to main content

Posts

Showing posts from April, 2012

C# Function to get Geo Coding Using Google Maps Geocoding API

using  Newtonsoft.Json;publicclassGeoLocation     {         publicdecimal Lat { get; set; }         publicdecimal Lng { get; set; }     }     publicclassGeoGeometry     {         publicGeoLocation Location { get; set; }     }     publicclassGeoResult     {         publicGeoGeometry Geometry { get; set; }     }     publicclassGeoResponse     {         publicstring Status { get; set; }         publicGeoResult[] Results { get; set; }     }privateDictionary<string, string> getLatLong(string address)     {   Dictionary<string, string> diclatlong = newDictionary<string, string>();   string url = "http://maps.googleapis.com/maps/api/geocode/json?address="  + Server.UrlEncode( address) + "&sensor=false";         WebResponse response = null;         try         {          HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);          request.Method = "GET";          response = request.GetResponse();��������…

Calculate Age Function

private int CalculateAge(int year, int month, int day)
        {
            int age = 0;
            age = DateTime.Now.Year - year;
            if (DateTime.Now.Month < month)
                age--;
            if (DateTime.Now.Month == month)
            {
                if (DateTime.Now.Day < day)
                    age--;
            }
            return age;
        }

HTML Email Template Outlook

 Problem : You want to create a HTML template (Such as HTML formatted Email template to circulate within the organization, mentioning the latest Updates etc) in Outlook 2010


Solution
1. Create Your HTML design
2. Copy the HTML & the images to this folder C:\Program Files\Common Files\microsoft shared\Stationery
3. Give a proper name to your HTML file so that in templates you can easily identify it
4. Open Outlook 2010, Go to  File > Options > Mail > Click on Stationery and Fonts
5. Click on Theme button under Personal Stationery Tab
6. Choose your theme from the left list Click Ok & close all Windows. Now when you create a new email you can see your theme loaded.


Let me know if you need any more details :)