SiteServices siteServiceobj = new SiteServices(); List<Site> siteList = siteServiceobj.GetAllSites(2); List<string> latLongList = (from site in siteList select "'" + site.NominalLat.ToString() + "," + site.NominalLong.ToString() + "'").ToList<string>(); var geocodevalues = string.Join(",", latLongList.ToArray()); List<string> OmessageList = (from site in siteList select "'<span class=formatText >" + site.SiteName + "!!!</span>'").ToList<string>(); String message = string.Join(",", OmessageList.ToArray()); ClientScript.RegisterArrayDeclaration("locationList", geocodevalues); ClientScript.RegisterArrayDeclaration("message", message);
<script type="text/javascript"> function alertfunction() { alert(locationList); alert(message); } window.onload = alertfunction; </script>
tionList
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)