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

86
Views
Passing json to javascript method from aspx

Im trying to pass to javascript method declared in my aspx page , a json as string,

    <a href="javascript: void(0)" onclick="javascript: JsonParser('{"root":"assd3444"}')">

but i got always same error:

Uncaught SyntaxError: Invalid or unexpected token

in the same row that i posted above, in browser.

Method is empty and declared in top of the page :

  function JsonParser(jsonString) {
            debugger;
            // do something with json
        }

How i can pass json string to a javascript method from aspx ?

I have also tried to put \ before double quotes in json string but it still doesn't work.

Thanks

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!