Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

233
Views
Cómo convertir un objeto de lista de C# en una matriz de JavaScript
 function Test_Country_OnItemSelection(ddlCountryId, ddlcityId, DataList) { var ddlCountry = document.getElementById(ddlCountryId); var selectedValue = ddlCountry.options[ddlCountry.selectedIndex].value; var selectedText = ddlCountry.options[ddlCountry.selectedIndex].text; var ddlcity = document.getElementById(ddlcityId); }

Tengo la función de JavaScript anterior en la que paso parámetros para las listas desplegables ddlCountryId y ddlcityId. Luego paso el parámetro final DataList, que es un objeto de C# definido como List<City> y contiene CityId, CityName y CountryID.

¿Cómo puedo convertir el objeto DataList en una matriz de JavaScript que luego puedo filtrar en CountryID == selectedValue y luego actualizar la lista desplegable ddlcity después de aplicar mi filtro?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!