Monday, November 8, 2010

How to connect a mobile device with your system....

Here i want to share an important knowladge with you.
how to detect a mobile device in your computer


sampleCode.cs
=======================================
using System;
using System.Web;using System.Web.Configuration;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{   
HttpBrowserCapabilities hbc = Request.Browser;   
if (((HttpCapabilitiesBase)hbc).IsMobileDevice)   
{       
Response.Write("You are browsing from a mobile device");   
}   
else   
{       
Response.Write("No mobile device");   
}
}
}

=======================================
use it in your program.its very interesting...
if you have any problem with this code then post your comment about that.