Mursaleen Hassan

Mursaleen Hassan

  • 1.8k
  • 22
  • 1.6k

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)