Monday, April 27, 2009

Get Country Name Based on User Location For Redirect , Asp.net, C#

Get Country Name Based on User Location For Redirect , Asp.net, C#
 
 
using
System;

using

System.Data;

using

System.Configuration;

using

System.Collections;

using

System.Web;

using

System.Web.Security;

using

System.Web.UI;

using

System.Web.UI.WebControls;

using

System.Web.UI.WebControls.WebParts;

using

System.Web.UI.HtmlControls;

using

System.Globalization;

public

partial class Default3 : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

Response.Write(

RegionInfo.CurrentRegion.DisplayName);

}

}


http://msdn.microsoft.com/en-us/library/system.globalization.regioninfo(vs.71).aspx

No comments: