title: what is wrong with the below code?
body: <pre><code>string str = "&lt;script type='text/javascript'&gt;" +
                   "var lat=lon=-1;" +
                   "getLocation();" +
               "function getLocation() {" +
                   "if (navigator.geolocation) {" +
                       "navigator.geolocation.getCurrentPosition(showPosition);" +
                   "}" +
                "}" +
               "function showPosition(position) {" +
                   "lat=position.coords.latitude;" +
                   "lon=position.coords.longitude;" +
                   "document.getElementById('&lt;%=ltrLat.ClientID%&gt;').innerHTML=lat;"+
                   "document.getElementById('&lt;%=ltrLon.ClientID%&gt;').innerHTML= lon;"+
                   "var x= document.getElementById('&lt;%=ltrLat.ClientID%&gt;').innerHTML;"+
                   "var y= document.getElementById('&lt;%=ltrLon.ClientID%&gt;').innerHTML;" +
                   "alert('lat='+x+'lon='+ y);" +
               "}" +
               "&lt;/script&gt;";
                ClientScriptManager cs = this.ClientScript;
                cs.RegisterStartupScript(this.GetType(),"xyz", str);
  </code></pre>
  
  <p>ltrLat and ltrLon are asp label on client side.
  moreover the labels are not displayed
  I do not get the alert.</p>