web开发在靠山将数据转化为字符串,将字符串传递给前台,在前台进行解析

web开发在后台将数据转化为字符串,将字符串传递给前台,在前台进行解析
下面给出后台代码(借助 Response.Write可以将经纬度数据成功显示在前台):
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;
using System.Data.Sql;

public partial class TEST1 : System.Web.UI.Page
{
    public static string sCon = ConfigurationManager.AppSettings["connect"];
    public static SqlConnection con = new SqlConnection(sCon);

    public string longitude=string.Empty;//经度字符串  
    public string latitude = string.Empty; //纬度字符串
    public static int SumCount; 

    protected void Page_Load(object sender, EventArgs e)
    {//2、连接数据库
        if (string.IsNullOrEmpty(sCon))
        {
            Response.Write("连接字符串为空!");
        }
        //3、打开数据库 
        if (con.State == ConnectionState.Closed)
        {
            con = new SqlConnection(sCon);
            con.Open();
        }    
        
        SqlCommand cmd = new SqlCommand("SELECT Longitude,Latitude FROM Goods", con);
                
        if (!Page.IsPostBack)  
        {
            GetLonLat(cmd, longitude, latitude);
         }  
}
public void GetLonLat(SqlCommand cmd, string longitude, string latitude)
    {
        double[] Longitudes = new double[1024];
        double[] Latitudes = new double[1024];
        int count = 0;
        cmd.CommandTimeout = 600; 
        SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
        DataTable dt = new DataTable();//实例化一个datatable
        dt.Load(reader);//将取到得数据填充到这个datatable中
        reader.Dispose();//释放reader对象
        con.Dispose();//释放conn对象
        //判断dt中这有没有数据
        for (int i = 0; i < dt.Rows.Count; i++)
            {
                //获取经度
                string strlon = dt.Rows[i]["Longitude"].ToString();
                Longitudes[count] = System.Double.Parse(strlon);
                longitude += Longitudes[count] + "|";//将读取的传感器经纬度存储为字符串形式</span>  
                //获取纬度
                string strlat = dt.Rows[i]["Latitude"].ToString();
                Latitudes[count] = System.Double.Parse(strlat);
                latitude += Latitudes[count] + "|";
                count = count + 1;
            }
        
        SumCount = count;
        Response.Write(longitude + count + latitude);
    }  

目前字符串longitude和 latitude里面已经可以包含数据,请问如何将字符串传递给前台,并在前台进行解析?后台为C#,前台为js,使用Arcgis api
------解决方案--------------------
你输出的字符串是形如这样的
y
------解决方案--------------------
y
------解决方案--------------------
y
------解决方案--------------------