Mursaleen Hassan

Mursaleen Hassan

  • NA
  • 22
  • 4.5k

In Javascript array use Asp.net Foreach Loop

Apr 23 2018 6:37 AM
  1. @foreach (var i in Model)  
  2. {  
  3. @:var stops_data = [[{"Geometry": {"Latitude": @i.tlat.ToString(), "Longitude": @i.tlng.ToString() } },  
  4.   
  5. @: { "Geometry": { "Latitude": @i.flat.ToString(), "Longitude": @i.flng.ToString() } }];  
  6.   
  7. }  
I am tired to use asp.net foreach to in javascript code.
thanks for advance 

Answers (1)