Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am working on my website using asp.net C#

I want my user to view their respective Country flags on the top corner of my website.

.

What I have tried:

Suppose the user's IP is from India It Should display Indian Flag on the Top Corner of the Website. Similarly for the other countries.I have tried many sites there is no proper solution found. Kindly Help us
Posted
Updated 7-Jun-17 0:06am
Comments
F-ES Sitecore 7-Jun-17 6:30am    
"here is no proper solution found"

That's because IP addresses contain no geographical information. You needing them to isn't going to change that I'm afraid.

1 solution

Here's a start: Using IP based Geolocation - and why it's pretty much useless.[^] - it gives the code to get the country (as well as other info) but explains why it isn't always accurate.
To use that, you'll need the flag images: Country flags of the world with images and names[^] shows them all.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900