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 8729871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:54:29+00:00 2026-06-13T08:54:29+00:00

I’m doing a school project, I need to make a simple web site, add

  • 0

I’m doing a school project, I need to make a simple web site, add google maps on it, read, lets say, 100 diffrent addresses from a text file and show those locations on google maps with markers.

Now I’m trying to add google maps to my ASP.net page with javascript which I saw on google maps tutorials. And there’s that problem which I have to convert adresses to coordinates. So for that I’m using

function addAddressToMap(response) {
    if (!response || response.Status.code != 200) {
        alert("Sorry, we were unable to geocode that address");
    } 
    else {
        place = response.Placemark[0];
        point = new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]);
        marker = new GMarker(point);
        map.addOverlay(marker);
        marker.openInfoWindowHtml(place.address + '<br>' + '<b>Country code:</b> ' + place.AddressDetails.Country.CountryNameCode);
    }
}

// showLocation() is called when you click on the Search button
// in the form.  It geocodes the address entered into the form
// and adds a marker to the map at that location.
function showLocation() {
    var address = "izmit";
    var address2 = "ağrı";
    geocoder.getLocations(address, addAddressToMap);
    geocoder.getLocations(address2, addAddressToMap);
}

these functions and they are working fine. But my problem here is, I need to get these address informations from a text file. But to get them, I need to use a few diffrent codes. And I want to make it on the server side with C# codes. But I don’t know how to write some codes on server side and then return something to HTML side as address. I hope you understand. Thank you for your helps.

Update:

Server code:

public partial class _Default : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {

        Page.ClientScript.RegisterArrayDeclaration("Skills", "'asa'");
        Page.ClientScript.RegisterArrayDeclaration("Skills", "'bell'");
        Page.ClientScript.RegisterArrayDeclaration("Skills", "'C'");
        Page.ClientScript.RegisterArrayDeclaration("Skills", "'C++'");
    }
}

Client side:

function showLocation()
{
    var address = "izmit";
    var address2 = "ağrı";
    geocoder.getLocations(Skills[0], addAddressToMap);
}

Now if I use “asa” instead of Skills[0] it will show the location and mark, but with Skills[0] it’s not working. And thank you for your answer that was what I’m looking for.

even if I try var MyValue = Skills[0]; and then use MyValue instead of Skills[0] it’s still not working

  • 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-06-13T08:54:30+00:00Added an answer on June 13, 2026 at 8:54 am

    If I understood your question correctly, you want to create an array on the server side and read it in the client.

    See this link for a tutorial on how to pass an array from the server to the client.

    Basically, you want to use the ClientScriptManager.RegisterArrayDeclaration method to add values to the array.

    You can then easily read it in javascript.

    Server Side:

    string arrayName = "MyArray";
    Page.ClientScript.RegisterArrayDeclaration(arrayName , "'value1'");
    Page.ClientScript.RegisterArrayDeclaration(arrayName , "'value2'");
    

    Javascript on Client Side:

    function readArray() 
    {
                for (var i = 0; i < MyArray.length; i++) 
                {
                    //Reading Element From Array
                    var myValue = MyArray[i];
                }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a simple page using Google Maps API 3. My first. One marker
I am doing a simple coin flipping experiment for class that involves flipping a
Seemingly simple, but I cannot find anything relevant on the web. What is the
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
In my XML file chapters tag has more chapter tag.i need to display chapters

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.