VB.NET get timezone vb.net - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution
join us

get client timezone vb.net


 144

VB.NET


0

// default.aspx

<%@ Page Language="VB" AutoEventWireup="true" CodeFile="myfile.vb" Inherits="myfile" %>
<!-- code section -->
<script runat="server">

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

Response.Write(GetCountry())

End Sub
</script>

<html>
<head>
</head>
<body>
</body>
</html>

// myfile.vb

Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.Services
Imports System.Web.Script.Serialization

Partial Public Class myfile
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub

Public Function GetCountry() As String

Dim wc as New System.Net.WebClient
Dim myip as String = wc.DownloadString("https://l2.io/ip")
Dim mycountry as String = wc.DownloadString("http://freegeoip.net/json/" + myip)

Dim jss As New JavaScriptSerializer()
Dim dict As Dictionary(Of String, String) = jss.Deserialize(Of Dictionary(Of String, String))(mycountry)

Dim s As string = dict("time_zone")

Return s
End Function

End Class


By        
The power of the user (%)
80%



The most helpful VB.NET solutions

get computer name vb.net get computer name vb.net VB.NET

Click to see more ...

  1.1K     76

get domain name vb.netget domain name vb.netVB.NET

Click to see more ...

  924     71

how to get client ip address using vb.net ?how to get client ip address using vb.net ?VB.NET

Click to see more ...

  763     63

How to get client machine name or computer name with vb.net?How to get client machine name or computer name with vb.net?VB.NET

Click to see more ...

  1K     57

array vb.netarray vb.netVB.NET

Click to see more ...

  508     56

get client country vb.netget client country vb.netVB.NET

Click to see more ...

  445     52

get client latitude and longitude vb.netget client latitude and longitude vb.netVB.NET

Click to see more ...

  290     36

detect mobile vb.netdetect mobile vb.netVB.NET

Click to see more ...

  254     23

get machine name vb.netget machine name vb.netVB.NET

Click to see more ...

  269     22

detect browser vb.netdetect browser vb.netVB.NET

Click to see more ...

  179     16

Welcome aboard!
We are happy you are here and
wish you good net-raft!