As usual, I thought of writing an absolute beginner level tutorial for jQuery Mobile & .net web service developers. First open the Visual Studio and create a Service. Visual Studio will create a service template with a name of Service1. Change the Hello world method in it as below using System; using System.Collections.Generic; using System.Linq; […]
How to Handle iOS 6 POST Caching Bug in C# Web Service
Last week many users were changing to iOS 6 and one of our products running on jQuery Mobile started to behave odd. Service started to return old values and all. Some Google search reveled that it is a bug in iOS 6. You can tackle this issue in C# Web Services by disabling cache. public […]
Get Only Time out of DateTime Variable in C#
I was working with C# web-service today and had a requirement to get the time in HH:mm format and save it in a String variable. Here how you do it in C# DateTime dt = DateTime.Parse(“6/22/2009 07:00:00 AM”); dt.ToString(“HH:mm”); // 07:00 // 24 hour clock // hour is always 2 digits dt.ToString(“hh:mm tt”); // 07:00 […]
Embed Google Maps in C# Application
First check out this post to see how you can retreive the GPS location of your device. Then you can use following code to display the map in your windows form String locationString = @”http://maps.google.com/maps/api/staticmap?center=” + lat.ToString() + “,” + lon.ToString() + “&zoom=14&size=250×250&maptype=roadmap&markers=color:red%7Clabel:S%7C” + lat.ToString() + “,” + lon.ToString() + “&sensor=false”; //System.Diagnostics.Process.Start(locationString); TaxiLocation loc = […]
New Window in C# .net
Form2 NewForm2 = new Form2(); NewForm2.Show();