How to detect IPhone / IPad through JavaScript
Here is code snippet which helps to identity IPhone or IPad through JavaScript. if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPad/i))) { //IPhone or IPad } And here is the C# snippet for user agent checking. if (Request.UserAgent.IndexOf("iPhone", StringComparison.CurrentCultureIgnoreCase) >= 0 || Request.UserAgent.IndexOf("iPad", StringComparison.CurrentCultureIgnoreCase) >= 0) { //IPhone / IPad } Happy Programming :)...
How to invoke C# from Javascript in Android
This post about to invoke C# from Javascript in Xamarin for Android. My last post related to building hybrid applications with C# and Xamarin, I got few comments like in hybrid application development, host language interface with javascript is an important topic, so I thought of writing a blog post....
How to detect hyperlink click in a webview android with C#
This post is about detecting hyperlink click in a Android webview with C#. This can be useful in two scenarios. You need to open an activity when user clicks on some hyperlink You need to do something when user clicks on some hyper link. You can achieve this by overriding...
Building Hybrid application for Android using C# and Xamarin studio
This post is about creating a Hybrid mobile application for Android using C# and Xamarin studio. Hybrid apps are part native apps, part web apps. Like native apps, they live in an app store and can take advantage of the many device features available. Like web apps, they rely on...
User Group Meeting and Xamarin Workshop - 23rd November 2013 (Saturday) - Kochi
Kerala Microsoft User Group (K-MUG) is conducting monthly UG meeting and Xamarin Workshop on 23rd November at Infopark, Kochi. Venue Orion India Systems Pvt Ltd, 103, 2nd floor, Tejomaya, Info park SEZ, Kakkanad, Kochin-682030 Agenda 09:30 - 09:40 Community updates 09:40 - 10:40 Cross Platform Mobile Development in C# &...
Preventing Cross-Site Request Forgery (CSRF) Attacks in WebAPI
CSRF is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated. With a little help of social engineering (like sending a link via email/chat), an attacker may trick the users of a web application into executing actions of...
How to execute a Stored Procedure with Entity Framework Code First
Recently I worked on a project, which I started as code first and then I forced to switch to Database first. This post is about executing procedures from EF code first. Here is my class structure and procedures. class DatabaseContext : DbContext { public DbSet<Book> Books { get; set; }...
Creating a Web API Controller with dynamic type
Most of the time while working with Web API; we were dealing with particular model from our domain and creating GET/POST/PUT/DELETE methods that map to CRUD operations. But today I faced an issue, where I need to store some data, and I don’t have a mapping class for the same....