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

109
Views
Acceda a la propiedad del componente de la maquinilla de afeitar desde un evento de JavaScript

Un componente de razor vincula su evento OnInput a una función de JavaScript. ¿Cómo puedo leer la propiedad del componente de la maquinilla de afeitar desde la función de JavaScript?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede agregar un método en su componente Razor con el atributo [JSInvokable]. En este método puede devolver las propiedades que necesita en su Javascript.

 [JSInvokable] public static Task<int[]> ReturnArrayAsync() { return Task.FromResult(this.MyProperty); }

Y en el lado de javascript:

 DotNet.invokeMethodAsync('{ASSEMBLY NAME}', 'ReturnArrayAsync', {ARGUMENTS}); //in that case we do not need arguments

Debería hacer el truco. Buena suerte :)

about 4 years ago · Juan Pablo Isaza Report
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!