I am trying to determine the hostname of the client accessing the webpage. If the user is coming from a .edu let them see the button. If not, don't let them see the button. After searching some groups this is what I have, but I can't get it to work.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Public Function IPToHostName(ByVal IPAddress As String) _
Dim objEntry As IPHostEntry
Dim sAns As String
objEntry = Resolve(IPAddress)
sAns = objEntry.HostName
Catch ex As Exception
sAns = ""