Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7002789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:58:28+00:00 2026-05-27T20:58:28+00:00

I have a Server side variable by the following code Dim mgps As New

  • 0

I have a Server side variable by the following code

 Dim mgps As New Text.StringBuilder
    Public ReadOnly Property GPS() As String
        Get
            Return mgps.ToString
        End Get
    End Property
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim con As New OleDbConnection
        con = New OleDbConnection("Data Source=sml; User ID=sml; Password=sml; provider=OraOLEDB.Oracle")
        con.Open()
        Dim cmd As OleDbCommand = New OleDbCommand("Select STA_NAME, GPS_ONE from GPS", con)

        Dim ds As New DataSet
        Dim I As Long
        Dim da As New OleDbDataAdapter(cmd)
        da.Fill(ds, "GPS")

        mgps.AppendLine("[")
        For I = 0 To ds.Tables("GPS").Rows.Count - 1
            mgps.AppendLine(ds.Tables("GPS").Rows(I).Item("GPS_ONE") & ",")
        Next I
        mgps.AppendLine("];")
    End Sub

The Variable is Global named GPS

Now I am trying to access it in client side JS Array
JS Array is below

 var store_locations = new Array();
    store_locations = [ 
       new google.maps.LatLng(31.204549793299,72.264183974237),
        new google.maps.LatLng(31.23004996385,72.282225091978),
        new google.maps.LatLng(31.148218,72.224542),
        new google.maps.LatLng(31.2330555556,72.3330555556)
        ];

Now I want to use GPS varible values instead of custome values in store_locations.

How can it be done anyone please help me.

Here is my loop where I want to access the array values.

 for(i=0; i<store_locations .length-1; i++)
    {

          var image = 'ico/no.png';
          markers[i] = new google.maps.Marker(
          { 
           position: store_locations [i],
           map: map,
           draggable:true,
           icon:image,
           title: (i+1) + GPS
           });                             
    }    

I have access the GPS variable as below

var GPS = <%=GPS %>

and replace the store_locations with GPS but my map become empty.

Please tell me what exactly i am missing to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:58:29+00:00Added an answer on May 27, 2026 at 8:58 pm

    You may create a public property that returns GPS value in code-begind. Create a String or StringBuilder object and define public property.

    Dim mgps As new Text.StringBuilder
    
    Public ReadOnly Property GPS As String
      Get
         Return mgps.ToString
      End Get
    End Property
    

    Use mgps (stringbuilder) object to add data from database result.

    mgps.AppendLine("[")
    For I = 0 To ds.Tables("GPS").Rows.Count - 1
        mgps.AppendLine(ds.Tables("GPS").Rows(I).Item("GPS_ONE") & ",")
    Next I
    mgps.AppendLine("];")
    

    Now you can use GPS in JavaScript:

     var  GPS = <%=GPS %> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to adress the following issue: I have a server side .net application
I have a the following server side app.config for a WCF service: <system.serviceModel> <bindings>
I have a server side ImageButton, and a server side Button, and then a
What tools for server side application performance testing you suggest? Have an application server
It's Friday afternoon and my brain is fried. I have a unique server side
I have to maintain a server-side script written in JScript (NOT Javascript) that needs
I have a Silverlight application communicating with the server side through WCF services. Initially
i have a rhel 4 server and use php as a server side scripting
I currently have a fairly robust server-side validation system in place, but I'm looking
I have done a bit of testing on this myself (During the server side

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.