I would like to make ASP.NET MVC 3 page displaying different view depending on geolocation.
For example, US visitors should see View1, and the rest of the world should see View2.
I would appreciate any advice you may have!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You may take a look at the following blog post. It presents a very nice technique that allows you to render appropriate view based on browser capabilities (whether its mobile or not) by using a custom view engine. This technique could be very easily tweaked so that instead of using the UserAgent header you would use the IP address of the client and based on its location resolve to the appropriate view. You will also need a GeoLocation service or database which will allow you to determine the location of the given IP address.