Click here to Skip to main content
15,887,936 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
------------c# code--------
C#
public string lati = "22.299261499741196,70.806884765625";
   public string longi = "22.897683210648072,72.6416015625";


----------javascript code---------


XML
latitute=<%=this.lati%>;
   longitute=<%=this.longi %>;
             alert(latitute);




when i give alert than it will alert only 22.299261499741196
i want to print whole string
please help me
Posted
Comments
Thomas ktg 18-Sep-13 2:15am    
You want to get only 22.299261499741196 from lati = "22.299261499741196,70.806884765625" or whole string?
Bama Boy 18-Sep-13 2:54am    
i want full string which define in variable

1 solution

Just use following code :-

JavaScript
var latitute = '<%= this.lati  %>';


I just used single quote around expression.

Good luck.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900