.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

I.P Address to Location ? by Programming (L I N Q) ? ?

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :ASP.Net
Hello Experts .. Kindly Help me in this .... I have to fetch Location (country , state)  of IP by which orders are purchased .... I managed to get the IP Address of the coustmer by My main concern is location .... can i do this by Programming Via LINQ ....Is this necessary to use another database ... As i get the code which is in VB .... kindly Help me by converting this code in C# or LINQ ... or give me new suggestions ...______________________________________________________________________________________________________________________Protected Sub Button1_Click(ByVal sender As Object,_ ByVal e As System.EventArgs) Handles Button1.Click On Error GoTo HandleError Dim strGetIP As String Dim dblGetLongIP As Double Dim dblPrevPosition As Double Dim dblPosition As Double Dim dblNumber As Double strGetIP = orders.CoustomerIP For i = 1 To 4 dblPosition = InStr(dblPrevPosition + 1, strGetIP, ".", 1) --------- As i used online VB to C# converting this for loop is creating problem ... kindly .. If i = 4 Then dblPosition = Len(strGetIP) + 1 End If dblNumber = Int(Mid(strGetIP, dblPrevPosition + 1, dblPosition - dblPrevPosition - 1)) dblPrevPosition = dblPosition dblGetLongIP = ((dblNumber Mod 256) * (256 ^ (4 - i))) + dblGetLongIP Next

View Complete Post

More Related Resource Links

locating the ip address location



I buildt an application which stores the values of the visiters of our website. date of visit, browser type, ip address, etc. I just what to locate their location according to ip address automatically. How can I do that? do I need to use a external database to retrive ip address locations?

Location-Aware Programming: Visualizing Bing Routes on Windows Phone 7


Learn how to bring location-aware features into your Windows Phone 7 applications and visualize routes and locations in different ways as you build an app that shows you the location of nearby restaurants.

Sandrino Di Mattia

MSDN Magazine May 2011

Coding / Programming Tips for C#

Using proper guidelines and a template-framed style of coding will really helps developer to enjoy the coding with more understandable, reliable code and application development.

IP Address Blocking or Restriction in SQL Server

"is it possible to block connections to SQL Server based on IP address". As far as now there is no official way in SQL Server to block the connections in SQL Server based on IP address. However this can be done from the OS end, we have the following three options available, refer HERE for more.

.RRAS IP Filter

C# Object Oriented Programming

So far in C# Essentials we have looked at the basics of programming in C# such as variable types and flow control. Although it would be possible to write a functional program using these techniques, there is much more to becoming a proficient C# programmer. C# is, above all, an object oriented programming language and as such any C# programmer will be expected to create object-oriented applications using this language.

Object Oriented Programming

Four core concept of OOP Object Oriented Programming. 1.Inheritance, 2.Polymorphism, 3.Abstraction and 4.Encapsulation

Object-Oriented Programming Concepts

This is the first in a series of articles describing the use of object-oriented programming techniques as implemented by the C# programming language. This series follows the C# Fundamentals tutorial that beginners are advised to read first.

my ip address

IP Tejji answers question like what is my ip address? find my ip addresss? detect my ip address? Best part is it also determines your local ip address as well as mac address. Further if you keen on browser specification and details regarding browser capabilities can also be found. It also help you see your geographic location. Other details that are available are Latitude, Longitude, timezone, country, region & city. In short it is one-stop-shop for very rich details about your IP and related information.

Parallel port complete: programming, interfacing & using the PC's parallel

Parallel port complete: programming, interfacing & using the PC's parallel


SOA Tips: Address Scalability Bottlenecks with Distributed Caching


SOA makes application scalability easier, but getting the best performance out of your SOA means paying close attention to the details. We'll give you some tips for coding your app more effectively and using distributed caching to remove data access bottlenecks.

Iqbal Khan

MSDN Magazine June 2010

F# Basics: An Introduction to Functional Programming for .NET Developers


F# has clean syntax, powerful multi-threading capabilities, and fluid interoperability with other Microsoft .NET Framework languages. We'll give you an introduction to functional programming concepts and how they're implemented in F#.

Chris Marinos

MSDN Magazine April 2010

Patterns in Practice: Functional Programming for Everyday .NET Developers


This article examines how the new support for functional programming techniques in .NET 3.5 can developers make code more declarative, reduce errors in code, and write fewer lines of code for many common tasks.

Jeremy Miller

MSDN Magazine October 2009

Toolbox: Managing in the Cloud, UX Design Patterns, Anders Hejlsberg's The C# Programming Language,


Now that you're even managing projects in the cloud, you'll need some tools to help. This month we illustrate one, discuss UX design patterns, a book by Anders Hejlsberg, and more.

Scott Mitchell

MSDN Magazine June 2009

Under the Table: Programming with FileStreams in SQL Server 2008


There's always been disagreement about whether large blobs, such as document and multimedia items, should be stored in the database or file system. In SQL Server 2008 you don't have to choose; filestream storage provides the best of both approaches.

Bob Beauchemin

MSDN Magazine May 2009

Toolbox: The Active Record Pattern, Aspect-Oriented Programming


This month we look at implementing the Active Record Pattern in your .NET application and how aspect-oriented programming yields separation of concerns.

Scott Mitchell

MSDN Magazine February 2009

Windows Mobile: Use GPS And Web Maps For Location-Aware Apps


We show you how to build a location-aware task list application for Windows Mobile devices that uses GPS to remind you of a task when and where it's appropriate.

Christopher Mitchell

MSDN Magazine January 2009

Paradigm Shift: Design Considerations For Parallel Programming


This article presents an overview of the motivation behind new techniques that decompose problems into independent pieces for optimal use of parallel programming.

David Callahan

MSDN Magazine October 2008

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend